有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

html Selenium IDE Java记录findElement(By.LinkText),但当脚本运行时,JUnit失败,声称它找不到元素

Selenium IDE版本:3.17.0
Mozilla Firefox版本:86.0
Webdriver:Gecko 0.29
日食:2020-12(4.18.0)
操作系统:Windows 10 1903 x64

我在堆栈上检查的位置:
Selenium Web-Driver can't find element (Selenium IDE does find it)
Selenium IDE can't find an element

页面检查的相关部分仅显示以下内容:

<a class="" _ngcontent-bjt-c16="" title="Title goes here.">  
  <i class="icon glyphicon glyphicon-stop"  _ngcontent-bjt-c16="">  
    ::before  
  </i>  
  Title goes here.  
</a>  

我运行了JUnit测试,得到了NoTouchElementException:无法定位元素

脚本记录了以下内容:

driver.findElement(By.linkText("Title goes here.")).click();

我很确定这不是等待的问题。任何见解都值得赞赏


共 (0) 个答案