【发布时间】:2021-08-07 16:42:54
【问题描述】:
我在 Eclipse 上使用 Selenium Webdriver,我想访问忘记密码的超链接:
<p class="mt15 text-center fs-12 forgot-password-links"><a href="forgotpassword.htm" class="text-blue text-capitalize text-center">Forgot Password?</a></p>
我尝试过使用 linkText、partialLinkTest 以及 WebElement。到目前为止似乎没有任何效果。有什么建议?提前致谢!
【问题讨论】:
-
您的装订语言是什么?
linkText,partialLinkText遇到的错误是什么? -
你能分享你到目前为止的尝试吗?
-
@Then("^user clicks on Forgot Password$") public void user_clicks_on_Forgot_Password(String href) throws Throwable { WebElement openLinks = driver.findElement(By.xpath("//div[@class= 'form-container-left']")); for(int i = 1; i
标签: selenium hyperlink webdriver automated-tests cucumber