我在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)