I am trying to run UI regression tests against a local project.
I am running the project with Browsersync, which ends up at localhost:3000.
I have tried setting the url to the directory of my distributed files but this also does not work. Internet Explorer opens but cannot connect to the page.
Here is my nightwatch.json
{
"src_folders" : ["nightwatch/tests"],
"output_folder" : "nightwatch/reports",
"custom_commands_path" : "nightwatch/commands",
"custom_assertions_path" : "nightwatch/assertions",
"page_objects_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : true,
"start_session" : true,
"server_path" : "C:\\Selenium\\selenium-server-standalone-2.52.0.jar",
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "",
"webdriver.ie.driver" : "C:\\Selenium\\IEDriverServer.exe"
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : false,
"on_failure" : false,
"on_error" : false,
"path" : "test/screenshots/"
},
"desiredCapabilities": {
"browserName": "internet explorer",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"chrome" : {
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
Here's my test
module.exports = {
before : function (browser) {
browser.resizeWindow(1024, 800);
},
'OOBE Homepage': function(browser) {
browser
.url('http://localhost:3000/index.html')
.waitForElementVisible('body', 5000)
.compareScreenshot('desktop-index.png')
.end();
},
};
Changing the launch_url to localhost:3000 worked.
{
"src_folders" : ["nightwatch/tests"],
"output_folder" : "nightwatch/reports",
"custom_commands_path" : "nightwatch/commands",
"custom_assertions_path" : "nightwatch/assertions",
"page_objects_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : true,
"start_session" : true,
"server_path" : "C:\\Selenium\\selenium-server-standalone-2.52.0.jar",
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "",
"webdriver.ie.driver" : "C:\\Selenium\\IEDriverServer.exe"
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost:3000",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : false,
"on_failure" : false,
"on_error" : false,
"path" : "test/screenshots/"
},
"desiredCapabilities": {
"browserName": "internet explorer",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"chrome" : {
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
Related
I can't find any valid nightwatch configuration for safari that does not include the entire Selenium jar. The nightwatch documentation says:
Using Selenium Standalone Server used to be the de-factor standard for
managing the various browser drivers and services, but starting with
Nightwatch 1.0 is no longer required, nor is it recommended, unless
you are testing against legacy browsers, such as Internet Explorer.
Does safari count as a legacy browser? Does anyone have an example of a working nightwatch 1.x config file that can run tests against safari?
MacOS: High Sierra 10.13.6
Safari: 12.0.2
Nightwatch: v1.0.18
My current nightwatch.json which works for Chrome but not safari:
{
"src_folders": [
"__tests__/e2e/tests"
],
"output_folder": "__tests__/e2e/reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "",
"webdriver": {
"start_process": true
},
"test_settings": {
"default": {
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true,
"chromeOptions": {
"args": [
"--window-size=1440,900"
]
}
}
},
"devChrome": {
"launch_url": "https://DEV_HOST",
"globals": {
"env": "dev"
},
"webdriver": {
"server_path": "node_modules/chromedriver/lib/chromedriver/chromedriver.exe",
"port": 9515
}
},
"devSafari": {
"launch_url": "https://DEV_HOST",
"globals": {
"env": "dev"
},
"webdriver": {
"server_path": "/usr/bin/safaridriver",
"port": 9515
}
}
}
}
Current error I am getting when I run the devSafari config:
Could not start server: must specify at least one configuration argument.
Got some help from the nightwatch team on GitHub (https://github.com/nightwatchjs/nightwatch-docs/issues/94) and I now have a working example config file for Nightwatch 1.x and Safari 10+. NOTE: By "working" I mean that the browser opens and I can see Nightwatch interacting with it. The tests don't actually pass the way they do in Chrome, but most likely this is just due to small browser differences that can be resolved in the test cases themselves.
{
"src_folders": [
"__tests__/e2e/tests"
],
"output_folder": "__tests__/e2e/reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "",
"webdriver": {
"start_process": true,
"server_path": "/usr/bin/safaridriver",
"port": 4445
},
"test_settings": {
"default": {
"desiredCapabilities": {
"browserName": "safari",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"safari": {
"launch_url": "localhost",
"desiredCapabilities": {
"browserName":"safari"
},
"globals": {
"env": "dev"
}
}
}
}
Run: /usr/bin/safaridriver --enable
Open Safari and check Develop > Allow Remote Automation, then close safari.
Run nightwatch
With Safari 10+, you just need to use safari as the browserName. Then make sure to specify the correct environment when running tests. For my config, that means passing the options --env safari. Here's my nightwatch.conf.js:
module.exports = {
src_folders: ['tests/e2e/specs'],
output_folder: 'tests/e2e/reports',
selenium: {
start_process: true,
server_path: require('selenium-server').path,
host: '127.0.0.1',
port: 4444,
cli_args: {
'WebDriver.chrome.driver': require('chromedriver').path,
},
},
test_settings: {
chrome: {
desiredCapabilities: {
browserName: 'chrome',
},
},
safari: {
desiredCapabilities: {
browserName: 'safari',
javascriptEnabled: true,
acceptSslCerts: true,
},
},
},
}
I'm trying to do an automated testing for a website using Nightwatch.js and I'm on macOS High Sierra.
So I started testing using the Selenium Standalone Server as said in the documentation.
The chrome testing works good and I have no problem with it. But I can't seem to make the Firefox testing work, I've been testing and searching online for a fix but I gave up because none of the solutions I found worked.
Here's is my nightwatch.json configuration file.
{
"src_folders": [
"test"
],
"output_folder": "reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "",
"selenium": {
"start_process": true,
"server_path": "./bin/selenium-server-standalone-3.13.0.jar",
"log_path": "",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "./bin/chromedriver",
"webdriver.gecko.driver": "./bin/geckodriver",
"webdriver.firefox.profile": "nightwatch"
}
},
"test_settings": {
"default": {
"launch_url": "https://www.google.com",
"selenium_port": 4444,
"selenium_host": "127.0.0.1",
"default_path_prefix": "",
"silent": true,
"screenshots": {
"enabled": false,
"path": ""
},
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true,
"marionette": true
}
},
"chrome": {
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions": {
"args": [
"--load-extension=/Users/jackch/Downloads/chrome, --url-base=/wd/hub"
]
}
}
}
}
}
And then when I run nightwatch -e --verbose in the terminal, I get the same error Error retrieving a new session from the selenium server Connection refused! Is selenium server started?.
I tried many things:
1) I started geckodriver in a separate terminal on the default port 4444, and here are the logs from geckodriver:
2018-07-23 12:09:03.432 plugin-container[27769:6329668] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7903, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-07-23 12:09:03.559 plugin-container[27769:6329668] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7943, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-07-23 12:09:03.624 plugin-container[27770:6329696] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7b37, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-07-23 12:09:03.713 plugin-container[27770:6329696] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7bcf, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
1532336943850 Marionette INFO Listening on port 52869
2018-07-23 12:09:04.333 plugin-container[27771:6329828] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7d07, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-07-23 12:09:04.413 plugin-container[27771:6329828] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7d83, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2) Then I tried to change the port of geckodriver, because I thought they may intefere since both Selenium and gecko choose the 4444 port, but nothing changed.
3) I tried to launch the Selenium server alone and then linking it. Which mean that I set the "start_process" to false in the nightwatch.json. And I still didn't manage to make it work.
Here is the complete message after I run nightwatch -e --verbose:
Starting selenium server... started - PID: 28112
[Test] Test Suite
=====================
Running: Login
INFO Request: POST /session
- data: {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","marionette":true,"name":"Test"}}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":145}
INFO Response 200 POST /session (1721ms) { value:
{ sessionId: '187e2af1-54a1-224a-9b8d-d4ff9f3913c7',
capabilities:
{ acceptInsecureCerts: false,
browserName: 'firefox',
browserVersion: '61.0.1',
'moz:accessibilityChecks': false,
'moz:headless': false,
'moz:processID': 28131,
'moz:profile': '/var/folders/vw/j4dsztz17sj_vtk500lv09r00000gn/T/rust_mozprofile.GRCHbtKdy2zm',
'moz:useNonSpecCompliantPointerOrigin': false,
'moz:webdriverClick': true,
pageLoadStrategy: 'normal',
platformName: 'darwin',
platformVersion: '17.7.0',
rotatable: false,
timeouts: { implicit: 0, pageLoad: 300000, script: 30000 } } } }
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ value:
{ sessionId: '187e2af1-54a1-224a-9b8d-d4ff9f3913c7',
capabilities:
{ acceptInsecureCerts: false,
browserName: 'firefox',
browserVersion: '61.0.1',
'moz:accessibilityChecks': false,
'moz:headless': false,
'moz:processID': 28131,
'moz:profile': '/var/folders/vw/j4dsztz17sj_vtk500lv09r00000gn/T/rust_mozprofile.GRCHbtKdy2zm',
'moz:useNonSpecCompliantPointerOrigin': false,
'moz:webdriverClick': true,
pageLoadStrategy: 'normal',
platformName: 'darwin',
platformVersion: '17.7.0',
rotatable: false,
timeouts: [Object] } } }
Thank you for any help you can bring.
I run nightwatch on mac os high sierra on firefox, safari, chrome. And on window opera, IE.
My config:
module.exports = {
"src_folders": ["tests"],
"output_folder": "reports",
// "live_output" : true,
// "parallel_process_delay" : 1500,
"custom_commands_path": "commands",
"custom_assertions_path": "assertions",
"page_objects_path": "",
"globals_path": "",
"selenium": {
"start_process": true,
"server_path": "./node_modules/nightwatch/lib/sel-serv.jar",
"log_path": "selenium_logs",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "./node_modules/.bin/chromedriver",
"webdriver.gecko.driver": "./node_modules/.bin/geckodriver",
"webdriver.edge.driver": "./node_modules/.bin/edgedriver",
"webdriver.ie.driver": "drivers/IEDriverServer.exe",
"webdriver.opera.driver": "drivers/operadriver.exe",
"webdriver.safari.driver": "/usr/bin/safaridriver"
}
},
"test_settings": {
"default": {
"selenium_port": 4444,
"selenium_host": "localhost",
"default_path_prefix": "/wd/hub",
"silent": true,
"screenshots": {
"enabled": true,
"on_failure": true,
"on_error": true,
"path": "tmp_screenshots"
}
},
"firefox": {
"desiredCapabilities": {
"browserName": "firefox",
"marionette": true,
"acceptSslCerts": true,
"javascriptEnabled": true
},
"globals": {
"type": "firefox",
"user": "me1",
"pass": "test"
}
},
"chrome": {
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions": {
"args": [
"disable-web-security",
"use-fake-device-for-media-stream",
"use-fake-ui-for-media-stream"
]
},
"acceptSslCerts": true,
"javascriptEnabled": true
},
"globals": {
"type": "chrome",
"user": "me1",
"pass": "test"
}
},
"opera": {
"desiredCapabilities": {
"browserName": "opera",
"operaOptions": {
"binary": "C://Program Files//Opera//53.0.2907.68//opera.exe"
},
"acceptSslCerts": true,
"javascriptEnabled": true
},
"globals": {
"type": "opera",
"user": "me4",
"pass": "test"
}
},
"ie": {
"desiredCapabilities": {
"browserName": "internet explorer",
"version": 11,
"allowBlockedContent": true,
"javascriptEnabled": true,
"acceptSslCerts": true,
"ignoreProtectedModeSettings": true
},
"globals": {
"type": "ie",
"user": "me3",
"pass": "test"
}
},
"safari": {
"desiredCapabilities": {
"browserName": "safari",
"javascriptEnabled": true,
"acceptSslCerts": true
},
"globals": {
"type": "safari",
"user": "me3",
"pass": "test"
}
}
},
"test_workers": {
"enabled": true,
"workers": "auto"
}
};
We are creating AWS Serverless Lambda function using .NET Core. When we deploy this lambda function it added automatically "Prod" suffix in the url. But we want change it to "dev". Can we declare stage name inside the serverless.template file?
Here is my serverless.template file:
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Transform" : "AWS::Serverless-2016-10-31",
"Description" : "An AWS Serverless Application that uses the ASP.NET Core framework running in Amazon Lambda.",
"Parameters" : {
},
"Conditions" : {
},
"Resources" : {
"Get" : {
"Type" : "AWS::Serverless::Function",
"Properties": {
"Handler": "F2C.MAP.API.AWSLambda.PublicAPI::F2C.MAP.API.AWSLambda.PublicAPI.LambdaEntryPoint::FunctionHandlerAsync",
"Runtime": "dotnetcore2.0",
"CodeUri": "",
"MemorySize": 256,
"Timeout": 30,
"Role": null,
"Policies": [ "AWSLambdaFullAccess" ],
"Environment" : {
"Variables" : {
}
},
"Events": {
"PutResource": {
"Type": "Api",
"Properties": {
"Path": "/{proxy+}",
"Method": "GET"
}
}
}
}
},
"POST" : {
"Type" : "AWS::Serverless::Function",
"Properties": {
"Handler": "F2C.MAP.API.AWSLambda.PublicAPI::F2C.MAP.API.AWSLambda.PublicAPI.LambdaEntryPoint::FunctionHandlerAsync",
"Runtime": "dotnetcore2.0",
"CodeUri": "",
"MemorySize": 256,
"Timeout": 30,
"Role": null,
"Policies": [ "AWSLambdaFullAccess" ],
"Environment" : {
"Variables" : {
}
},
"Events": {
"PutResource": {
"Type": "Api",
"Properties": {
"Path": "/{proxy+}",
"Method": "POST"
}
}
}
}
}
},
"Outputs" : {
}
}
We are using AWS Toolkit for visual studio 2017 to deploy aws serverless lambda.("https://aws.amazon.com/blogs/developer/preview-of-the-aws-toolkit-for-visual-studio-2017")
The only way I could find to make this work is the specify a AWS::Serverless::Api to use. The following example sets both the StageName and the ASPNETCORE_ENVIRONMENT to the EnvironmentName parameter.
serverless.template:
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Transform" : "AWS::Serverless-2016-10-31",
"Description" : "An AWS Serverless Application that uses the ASP.NET Core framework running in Amazon Lambda.",
"Parameters" : {
"EnvironmentName" : {
"Type" : "String",
"Description" : "Sets the ASPNETCORE_ENVIRONMENT variable as well as the API's StageName to this.",
"MinLength" : "0"
}
},
"Resources" : {
"ProxyFunction" : {
"Type" : "AWS::Serverless::Function",
"Properties": {
"Handler": "PeopleGateway::PeopleGateway.LambdaEntryPoint::FunctionHandlerAsync",
"Runtime": "dotnetcore2.0",
"CodeUri": "",
"MemorySize": 256,
"Timeout": 30,
"Role": null,
"Policies": [ "AWSLambdaFullAccess", "AWSLambdaVPCAccessExecutionRole" ],
"Environment" : {
"Variables" : {
"ASPNETCORE_ENVIRONMENT": { "Ref" : "EnvironmentName" }
}
},
"Events": {
"PutResource": {
"Type": "Api",
"Properties": {
"Path": "/{proxy+}",
"Method": "ANY",
"RestApiId": { "Ref": "APIGateway" }
}
}
}
}
},
"APIGateway": {
"Type" : "AWS::Serverless::Api",
"Properties": {
"StageName": { "Ref" : "EnvironmentName" },
"DefinitionBody": {
"swagger": "2.0",
"info": {
"title": {
"Ref": "AWS::StackName"
}
},
"paths": {
"/{proxy+}": {
"x-amazon-apigateway-any-method": {
"x-amazon-apigateway-integration": {
"httpMethod": "POST",
"type": "aws_proxy",
"uri": {
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ProxyFunction.Arn}/invocations"
}
},
"responses": {}
}
}
}
}
}
}
},
"Outputs" : {
"ApiURL" : {
"Description" : "API endpoint URL for the specified environment",
"Value" : { "Fn::Sub" : "https://${APIGateway}.execute-api.${AWS::Region}.amazonaws.com/${EnvironmentName}/" }
}
}
}
I'm trying to run test environment where each component is in a docker (nightwatchjs, browsers, selenium server).
But now I'm stuck in finding right "setup". I get "Connection is refused is Selenium started" all the time.
And it is weird because I set up webdriverio in a similar way and it works (repo forked from hulilabs repo).
https://github.com/MichalDulemba/webdriverio
Anybody can help?
If it works I will create a gihub/docker hub repo for other people :)
DOCKER COMPOSE:
version: '2'
services:
nightwatch:
image: dulemba/nightwatch
depends_on:
- chrome
- firefox
- hub
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
volumes:
- /home/michal/Dokumenty/nw/nightwatch/app:/app
hub:
image: selenium/hub
ports:
- 4444:4444
firefox:
image: selenium/node-firefox-debug
ports:
- 5900
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
chrome:
image: selenium/node-chrome-debug
ports:
- 5900
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
NIGHTWATCH.JSON
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : false,
"server_path" : "/opt/selenium/selenium-server-standalone.jar",
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "",
"webdriver.gecko.driver" : "",
"webdriver.edge.driver" : ""
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : false,
"path" : ""
},
"desiredCapabilities": {
"browserName": "firefox",
"marionette": true
}
},
"chrome" : {
"desiredCapabilities": {
"browserName": "chrome"
}
},
"edge" : {
"desiredCapabilities": {
"browserName": "MicrosoftEdge"
}
}
}
}
I don't know if this is still an issue for you, but this is working for me:
docker-compose.yml
hub:
image: selenium/hub
ports:
- 4446:4444
firefox:
image: selenium/node-firefox-debug
ports:
- 4577
links:
- hub:hub
chrome:
image: selenium/node-chrome-debug
ports:
- 4577
links:
- hub:hub
=================
nightwatch.conf.js
const seleniumServer = require('selenium-server');
const chromedriver = require('chromedriver');
const geckodriver = require('geckodriver');
module.exports = {
src_folders: ['tests'],
output_folder: 'reports',
custom_assertions_path: '',
live_output: false,
disable_colors: false,
selenium: {
start_process: true,
server_path: seleniumServer.path,
log_path: '',
host: '127.0.0.1',
port: 4444
},
test_settings: {
default: {
screenshots: {
enabled: false,
path: '',
on_failure: true,
on_error: true
},
launch_url: 'http://localhost',
selenium_port: 4446,
selenium_host: '127.0.0.1',
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
},
selenium: {
cli_args: {
'webdriver.chrome.driver': chromedriver.path
}
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
marionette: true
},
selenium: {
cli_args: {
'webdriver.gecko.driver': geckodriver.path
}
}
}
}
};
Cheers!
Chrome driver can be started correctly, but failed when switch to phantomjs.
The strange thing is that the selenium process seems hanging there with no output, which is hard to debug.
I use my laptop with WIN7, download phantomjs.exe from its official website.
Since quite new to nightwatch, is there any advice or help?
Thanks a lot.
Here is my nightwatch.json configuration.
{
"src_folders": "tests",
"output_folder": "reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"selenium": {
"start_process": true,
"server_path": "lib/selenium-server-standalone-2.45.0.jar",
"log_path": "log",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "drivers/chromedriver.exe",
"webdriver.phantomjs.driver": "drivers/phantomjs.exe"
}
},
"test_settings": {
"default": {
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": false,
"desiredCapabilities": {
"browserName": "phantomjs",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"firefox": {
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"phantomjs": {
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "phantomjs",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
problem solved, it's because miss binary path in "desiredCapabilities".
However, it's not cool phantom is so unique while others do not need set this.
"phantomjs" : {
"desiredCapabilities" : {
"browserName" : "phantomjs",
"javascriptEnabled" : true,
"acceptSslCerts" : true,
"phantomjs.binary.path" : "/path/to/phantomjs" //need this line!!!
}
},