Skip to content

Instantly share code, notes, and snippets.

@drorm
Last active August 29, 2015 14:20
Show Gist options
  • Save drorm/454856765f8b7906e1a2 to your computer and use it in GitHub Desktop.
Save drorm/454856765f8b7906e1a2 to your computer and use it in GitHub Desktop.

Revisions

  1. drorm revised this gist May 5, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions run.sh
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@
    # Download Selenium and phantom.js for your platform (You probably want to redirect to a file the following).
    java -jar selenium-server-standalone-2.45.0.jar -role hub &
    phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://0.0.0.0:4444 &
    #Download nightline.js
    #Download nightwatch.js
    #Once the above are running
    #nightwatch --env phantom
    #Or
    #nightwatch --env saucelabs
    #will
    #will run the appropriate version
  2. drorm created this gist May 5, 2015.
    49 changes: 49 additions & 0 deletions nighwatch.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    {
    "src_folders" : ["tests"],
    "output_folder" : "reports",
    "custom_commands_path" : "",
    "custom_assertions_path" : "",
    "page_objects_path" : "",
    "globals_path" : "",

    "selenium" : {
    "start_process" : false,
    "server_path" : "",
    "log_path" : "",
    "host" : "127.0.0.1",
    "port" : 4444,
    "cli_args" : {
    "webdriver.chrome.driver" : "",
    "webdriver.ie.driver" : ""
    }
    },

    "test_settings" : {
    "phantom" : {
    "launch_url" : "http://localhost",
    "selenium_port" : 4444,
    "selenium_host" : "localhost",
    "silent": true,
    "screenshots" : {
    "enabled" : false,
    "path" : ""
    },
    "desiredCapabilities": {
    "browserName": "phantomjs",
    "javascriptEnabled": true,
    "acceptSslCerts": true
    }
    },
    "saucelabs" : {
    "selenium_host": "ondemand.saucelabs.com",
    "selenium_port": 80,
    "username": "yourname",
    "access_key": "xxxxxxxxxxxx",
    "desiredCapabilities": {
    "browserName": "chrome",
    "platform": "Windows 8.1",
    "version": "40"
    }
    }
    }
    }
    10 changes: 10 additions & 0 deletions run.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #Need to run these first
    # Download Selenium and phantom.js for your platform (You probably want to redirect to a file the following).
    java -jar selenium-server-standalone-2.45.0.jar -role hub &
    phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://0.0.0.0:4444 &
    #Download nightline.js
    #Once the above are running
    #nightwatch --env phantom
    #Or
    #nightwatch --env saucelabs
    #will