当使用IE浏览器运行webdriver时,我收到消息“只允许本地连接”,尽管浏览器正常启动

时间:2016-07-27 07:10:34

标签: java selenium selenium-iedriver

我的代码在

下面
System.setProperty("webdriver.ie.driver", "C:\\Selenium_Software\\IEDriverServer.exe");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);      
driver = new InternetExplorerDriver(capabilities);
driver.get("http://10.32.147.151/RoSServer/WebClient/DoculiveSimulationExt.asp");
WD.wait(4);
flag=IsObjectPresent.byXpath("//table[@id='AutoNumber1']/tbody/tr[2]/td[6]/input[3]", true);
Click.byXpath("//table[@id='AutoNumber1']/tbody/tr[2]/td[6]/input[3]");

我收到了这个错误:

  

启动InternetExplorerDriver服务器(64位)2.53.1.0

     

收听端口5069

     

仅允许本地连接

2 个答案:

答案 0 :(得分:0)

尝试:

string DRIVER_PATH = @"C:\Selenium_Software\";

driver = new InternetExplorerDriver(DRIVER_PATH);
driver.get("http://10.32.147.151/RoSServer/WebClient/DoculiveSimulationExt.asp");
...

答案 1 :(得分:0)

say"这只是一条信息性消息。消息告诉您的是......驱动程序可执行文件只接受来自本地计算机的连接。"