小编use*_*215的帖子

Selenium:JUnit4:WebDriver:IE:使用IE时的NoSuchElementException

我在Selenium IDE中记录了我的测试; 它在Firefox和Chrome中运行良好.当我在IE 9中运行它时,我不断收到此错误.我是编码的新手,我很难找到答案.如果有人能用非专业人士的说法向我解释发生了什么/为什么会出现这种情况,我会很感激.

org.openqa.selenium.NoSuchElementException: Unable to find element with css selector == BODY (WARNING: The server did not provide any stacktrace information)
Run Code Online (Sandbox Code Playgroud)

Java代码:

assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*Final[\\s\\S]*$"));
Run Code Online (Sandbox Code Playgroud)

java selenium internet-explorer webdriver

5
推荐指数
1
解决办法
848
查看次数

标签 统计

internet-explorer ×1

java ×1

selenium ×1

webdriver ×1