[英]How to click on the ahref link using selenium webdriver 2.25 - java?
I am unable to click on the Opportunity link Action| 我无法单击“机会”链接。 Opportunity Name |
商机名称| Account Name |
帐户名| Stage |
舞台 Close Date |
截止日期| Opportunity Owner
机会所有者
<th scope="row" class=" dataCell ">
<a href="/006b00000029ay9?srPos=0&srKp=006" data-seclke="Opportunity" data-seclkh="bf4b3627c01dbc9e32ca3a945ddbe3ec" data-seclki="006b00000029ay9" data-seclkp="/006b00000029ay9" data-seclkr="1" onclick="searchResultClick.click(this)" onmousedown="searchResultClick.click(this)">Test Opp1</a>
I have added (-) hyphen in front of the tags to paste the HTML exact code what I am getting. 我在标签前面添加了(-)连字符,以粘贴HTML确切的代码。 I need to click on the ahref.
我需要单击ahref。 Kindly advise me what should I use?
请告知我应该使用什么?
driver.findElement(By.linkText("Test Opp1")).click();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.