【发布时间】:2021-03-24 04:23:34
【问题描述】:
我无法在网站上找到 Web 元素,该网站的 Web 元素是动态的,我试图定位的元素具有与其他元素非常相似的属性,只有很小的差异,例如整数变化。当我刷新页面时,这些整数也会发生变化,所以我无法找到有人可以帮忙吗?
我尝试了以下但语法可能有错误:
-
包含文本 =
WebDriverWait(browser, 15).until(EC.presence_of_element_located( (By.XPATH,"//div[contains(text(),'Type here...')]") )) -
Absolute Xpath 和 Rel Xpath(这些变化)
-
包含兄弟元素,包含父元素但父元素和兄弟元素也无法定位
这里是元素<div contenteditable="true" class="cke_textarea_inline cke_editable cke_editable_inline cke_contents_ltr placeholder cke_show_borders" tabindex="0" spellcheck="true" role="textbox" aria-label="Rich Text Editor, editor15" title="Rich Text Editor, editor15" aria-describedby="cke_849" style="position: relative;" xpath="1">enter question here</div>的html
【问题讨论】:
-
请添加html
-
在这里输入问题
-
@SelectorsHub-TheXPathTool 所以没有空间?
标签: python html selenium automation