我正在尝试使用fluintlenium进行硒测试,出于某种原因,当我尝试使用chrome驱动程序时,它只是在“数据”上打开chrome;页面,并没有继续我给它的实际网址。 当我使用HtmlUnitDriver时,它成功运行测试,但是使用chrome后它就停止了:
在端口36888上启动ChromeDriver 2.15.322448(****) 只允许本地连接。
我知道它只是一条信息消息,但它不会继续,只是卡住它没有显示任何错误......
代码是:
public class IntegrationTest extends FluentTest {
public WebDriver driver;
@Override
public WebDriver getDefaultDriver() {
driver = new ChromeDriver();
return driver;
}
/**
* add your integration test here
*/
@Test
public void title_of_bing_should_contain_search_query_name() {
goTo("http://www.bing.com");
fill("#sb_form_q").with("FluentLenium");
submit("#sb_form_go");
assertThat(title()).contains("FluentLenium");
}
}
我尝试过使用selenium的driver.get("url");
,但它也没有用。
答案 0 :(得分:0)
这并不意味着chromedriver没有启动。它只是一条信息消息,您只能在本地连接到它。
如果浏览器打开并且没有做任何进一步的操作,在您的情况下,这意味着您没有兼容的chrome和chrome驱动程序。如果你的铬是最新的,那么2.13 chromedriver对你来说太旧了,试试2.15