我已经尝试通过Id,XPath和CssSelector找到元素,但没有任何运气。测试在查找元素时超时。如何使用Selenium Webdriver识别此元素
<div xmlns="http://www.w3.org/1999/xhtml" id="HyperlinkBetaSentry"
style="top:0px;left:521px;height:24px;width:70px;cursor:pointer;text-align:center"
class="DashboardHyperlink"><a target="_blank"
href="https://salsa.sentry.com/SalsaDataSentry/wafForm.aspx?__sso=1234567890" style="color:#e6e7e8;vertical-align:middle;text-decoration:none">Beta Sentry</a></div>
我曾尝试:
var title = Driver.Instance.FindElement(By.CssSelector("#HyperlinkBetaSentry"));
var title = Driver.Instance.FindElement(By.Xpath("//*[@id='HyperlinkBetaSentry']"));
var title = Driver.Instance.FindElement(By.Id("HyperlinkBetaSentry"));