【发布时间】:2015-04-08 15:15:23
【问题描述】:
我正在尝试使用 Fluintlenium 编写硒测试,由于某种原因,当我尝试使用 chrome 驱动程序时,它只是在“data;”上打开 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"); 但它也不起作用。
编辑:我如何运行测试? 1. 我刚启动我的 selenium 服务器 2. 我使用 play 所以我运行命令 play test 或 2. 我使用 eclipse junit test runner 来运行单个测试。 两者都不起作用...
【问题讨论】:
标签: selenium junit selenium-chromedriver fluentlenium