<div id="content-body-14269002-17290547">
<p>...</p>
<p>...</p>
<p>...</p>
<p>...</p>
<p>...</p>
</div>
Run Code Online (Sandbox Code Playgroud)
我需要选择一切 id = "content-body*"
每个页面上的内容 - 主体更改,可能需要使用通配符?
小智 7
无论如何,
对于ID
//div[contains(@id,"content-body")]//p #to Select all Paragraphs
//div[contains(@id,"content-body")]//p//text() # To Select all text in Paragraphs
Run Code Online (Sandbox Code Playgroud)
对于类
//*[contains(@class,"content-body")//p
//div[contains(@class,"content-body")]//p//text()
Run Code Online (Sandbox Code Playgroud)
适用于班级
//*[contains(@class,"content-body") and contains(@class,"another-sub-content-body")]//p//text()
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你 !!!
| 归档时间: |
|
| 查看次数: |
9748 次 |
| 最近记录: |