Java “线程中的异常”;“主要”;org.openqa.selenium.remote.UnreachableBrowserException:与远程浏览器通信时出错
当我执行以下代码时,错误应该存在: 线程“main”中出现异常 org.openqa.selenium.remote.UnreachableBrowserException:错误 与远程浏览器通信。它可能已经死了。构建信息: 版本:“2.53.0”,修订版:“35ae25b”,时间:“2016-03-15 16:57:40” 我的代码如下:Java “线程中的异常”;“主要”;org.openqa.selenium.remote.UnreachableBrowserException:与远程浏览器通信时出错,java,selenium,selenium-webdriver,Java,Selenium,Selenium Webdriver,当我执行以下代码时,错误应该存在: 线程“main”中出现异常 org.openqa.selenium.remote.UnreachableBrowserException:错误 与远程浏览器通信。它可能已经死了。构建信息: 版本:“2.53.0”,修订版:“35ae25b”,时间:“2016-03-15 16:57:40” 我的代码如下: import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import o
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.browserlaunchers.locators.*;
public class Login {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
String baseUrl = " http://10.37.55.109/Exide_Esam/admin.html";
driver.get(baseUrl);
driver.findElement(By.id("txtUser")).sendKeys("ZASADMIN");
driver.findElement(By.id("txtPass")).sendKeys("Test");
WebElement checkbox;
checkbox = driver.findElement(By.className("checkbox-material"));
if(!checkbox.isSelected())
{
checkbox.click();
}
driver.findElement(By.id("btnLogin")).click();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
driver.findElement(By.xpath("//span[text()=' Master']")).click();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.findElement(By.xpath("//div[@class = 'mobile-view `enter code here`visible-xs']//ul[@class = 'sub-menu-list']//li[@id = 'SubMenu-1']")).click();
driver.quit();
这是在初始化过程中还是在浏览器实际运行时立即发生的?检查浏览器版本和selenium版本之间的兼容性。.AFAIK selenium 2.53.0可以与FF 46.0.1版本配合使用,对于47版本,您需要在firefoxdriver的功能中添加MarionetedRiver功能。这是在初始化过程中立即发生的吗初始化或浏览器实际运行的时间?检查浏览器版本和selenium版本之间的兼容性。对于47版本,AFAIK selenium 2.53.0可以与FF 46.0.1版本配合使用。您需要在firefoxdriver的功能中添加MarionetedRiver功能。