【发布时间】:2021-02-25 23:22:43
【问题描述】:
我想知道如何使用 selenium 在此 javascript:_doPostBack() 上单击 web 元素“automation_quiz”。
以下是来自html页面的sn-p:
<a id="ctl00_Content_tgv_ctl03_lbtCaption" title="click to launch automation_quiz" href="javascript:__doPostBack('ctl00$Content$tgv$ctl03$lbtCaption','')">automation_quiz</a>
我使用 firefox Xpath-finder 找不到“automation_quiz”的 Xpath。
【问题讨论】:
-
这是来自 html 页面的 sn-p:automation_quiz
-
//a[@id="ctl00_Content_tgv_ctl03_lbtCaption"]
-
//a[text()='automation_quiz']
标签: c# selenium xpath css-selectors webdriverwait