PhantomJS 和导体框架
PhantomJS & Conductor Framework
我正在使用 Conductor 框架来 运行 我的测试,我想 运行 使用 PhantomJS 进行测试。尽管 PhantomJS 安装在预期的目录中,但 Conductor 抱怨它没有。
我测试的 JUnit 配置:
@Config(browser = Browser.PHANTOMJS, url = "http://url")
日志输出:
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /Users/richhunt/IdeaProjects/selenium/phantomjs
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 48487
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=48487, --webdriver-logfile=/Users/richhunt/IdeaProjects/selenium/phantomjsdriver.log]
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
2015-11-23 10:58:52 [main] FATAL Locomotive:705 - phantomjs not found. Download them from https://bitbucket.org/ariya/phantomjs/downloads/ and extract the binary as phantomjs.exe, phantomjs.linux, or phantomjs.mac at project root for Windows, Linux, or MacOS.
Process finished with exit code 1
你可能没有实际安装 PhantomJS?从头开始,我 运行 进行了测试,并遇到了同样的问题。然后我 运行:
npm install -g webdriverjs phantomjs
然后重新运行相同的测试,它按预期工作。
这是我使用的测试:
@Config(browser = Browser.PHANTOMJS, url = "http://google.com")
public class PhantomJSTest extends Locomotive {
@Test
public void testPhantomJSWorks() {
setText("[name='q']", "Test");
}
}
我正在使用 Conductor 框架来 运行 我的测试,我想 运行 使用 PhantomJS 进行测试。尽管 PhantomJS 安装在预期的目录中,但 Conductor 抱怨它没有。
我测试的 JUnit 配置:
@Config(browser = Browser.PHANTOMJS, url = "http://url")
日志输出:
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /Users/richhunt/IdeaProjects/selenium/phantomjs
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 48487
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=48487, --webdriver-logfile=/Users/richhunt/IdeaProjects/selenium/phantomjsdriver.log]
Nov 23, 2015 10:58:32 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
2015-11-23 10:58:52 [main] FATAL Locomotive:705 - phantomjs not found. Download them from https://bitbucket.org/ariya/phantomjs/downloads/ and extract the binary as phantomjs.exe, phantomjs.linux, or phantomjs.mac at project root for Windows, Linux, or MacOS.
Process finished with exit code 1
你可能没有实际安装 PhantomJS?从头开始,我 运行 进行了测试,并遇到了同样的问题。然后我 运行:
npm install -g webdriverjs phantomjs
然后重新运行相同的测试,它按预期工作。
这是我使用的测试:
@Config(browser = Browser.PHANTOMJS, url = "http://google.com")
public class PhantomJSTest extends Locomotive {
@Test
public void testPhantomJSWorks() {
setText("[name='q']", "Test");
}
}