nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.79k stars 1.31k forks source link

SuiteRetry doesn't clear command queue before retrying module #745

Closed MateuszJeziorski closed 8 years ago

MateuszJeziorski commented 8 years ago

When I'm using SuteRetry options, seems like command queue is not cleared after assertion fails. Then browser is restarted and remaining command tries to execute on newly opened browser window using undefined sessionId. After this command fails, tests steps are executed, but whole suite is failed, because of remaining commands from first run. If I skip all commands after assertion fails, everythings works fine.

I'm using

Try to run this mode with option --suiteRetries 1

var failFirstTime = true;

module.exports = {
    tags: ['Containers'],

    before: function (browser) {
        browser.url("http://nightwatchjs.org");
    },

    after: function (browser) {
        browser.end();
    },

    'step1': function (browser) {
        browser.waitForElementPresent("a[href='/guide']", 15 * 1000);
        browser.click("a[href='/guide']");
    },

    'step2': function (browser) {
        browser.waitForElementPresent("a[href='/api']", 15 * 1000);
        browser.click("a[href='/api']", function () {
            if (failFirstTime) {
                failFirstTime = false;
                browser.assert.ok(false);
                //return; if this is not commented out, everything works fine
            }
            browser.waitForElementPresent("a[href='/blog']", 5 * 1000);
        });
    }
};

Selenium log, check what happens after new session is created. Seems like two commands are executed one after another - the remaining one from step2 and new one from step1

00:38:09.466 INFO - Launching a standalone Selenium Server
Setting system property webdriver.chrome.driver to ./node_modules/file_dependencies/chromedriver.exe
00:38:09.673 INFO - Java: Oracle Corporation 25.31-b07
00:38:09.673 INFO - OS: Windows 7 6.1 amd64
00:38:09.682 INFO - v2.48.0, with Core v2.48.0. Built from revision 41bccdd
00:38:09.743 INFO - Driver class not found: com.opera.core.systems.OperaDriver
00:38:09.743 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
00:38:10.027 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
00:38:10.027 INFO - Selenium Server is up and running
00:38:10.878 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]])
00:38:10.888 INFO - Creating a new session for Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]
Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 14709
Only local connections are allowed.
00:38:12.957 INFO - Done: [new session: Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]]
00:38:12.976 INFO - Executing: [get: http://nightwatchjs.org])
00:38:14.813 INFO - Done: [get: http://nightwatchjs.org]
00:38:14.822 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:14.855 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:14.862 INFO - Executing: [find element: By.cssSelector: a[href='/guide']])
00:38:14.884 INFO - Done: [find element: By.cssSelector: a[href='/guide']]
00:38:14.888 INFO - Executing: [click: 0 [[ChromeDriver: chrome on XP (e6aad1cef302ef0ee9a8799e33022747)] -> css selector: a[href='/guide']]])
00:38:15.074 INFO - Done: [click: 0 [[ChromeDriver: chrome on XP (e6aad1cef302ef0ee9a8799e33022747)] -> css selector: a[href='/guide']]]
00:38:15.085 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:15.127 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:15.132 INFO - Executing: [find element: By.cssSelector: a[href='/api']])
00:38:15.169 INFO - Done: [find element: By.cssSelector: a[href='/api']]
00:38:15.173 INFO - Executing: [click: 1 [[ChromeDriver: chrome on XP (e6aad1cef302ef0ee9a8799e33022747)] -> css selector: a[href='/api']]])
00:38:15.437 INFO - Done: [click: 1 [[ChromeDriver: chrome on XP (e6aad1cef302ef0ee9a8799e33022747)] -> css selector: a[href='/api']]]
00:38:15.444 INFO - Executing: [delete session: 7ce98313-4f02-415b-b9f4-706caad9502a])
00:38:16.917 INFO - Done: [delete session: 7ce98313-4f02-415b-b9f4-706caad9502a]
00:38:16.950 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]])
00:38:16.952 INFO - Creating a new session for Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]
Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 16930
Only local connections are allowed.
00:38:18.149 INFO - Done: [new session: Capabilities [{acceptSslCerts=true, name=Test, browserName=chrome, javascriptEnabled=true, platform=ANY}]]
00:38:18.161 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:18.187 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:18.523 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:18.529 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:18.558 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:18.581 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:18.694 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:18.750 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:19.066 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:19.086 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:19.110 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:19.128 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:19.260 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:19.290 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:19.620 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:19.633 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:19.640 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:19.655 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:19.799 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:19.820 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:20.149 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:20.161 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:20.178 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:20.199 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:20.330 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:20.353 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:20.689 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:20.708 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:20.718 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:20.738 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:20.868 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:20.896 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:21.227 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:21.247 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:21.256 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:21.277 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:21.405 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:21.428 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:21.770 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:21.781 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:21.794 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:21.813 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:21.936 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:21.962 INFO - Done: [find elements: By.cssSelector: a[href='/api']]
00:38:22.302 INFO - Executing: [find elements: By.cssSelector: a[href='/blog']])
00:38:22.319 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:22.326 INFO - Done: [find elements: By.cssSelector: a[href='/blog']]
00:38:22.334 INFO - Executing: [delete session: 8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d])
00:38:22.341 INFO - Done: [find elements: By.cssSelector: a[href='/guide']]
00:38:22.466 INFO - Executing: [find elements: By.cssSelector: a[href='/api']])
00:38:22.849 INFO - Executing: [find elements: By.cssSelector: a[href='/guide']])
00:38:23.622 INFO - Done: [delete session: 8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d]

Nightwatch logs (with silent = false) are even more interesting. Some verify first commands after suite is rerun, are executed with sessionID = undefined

Running:  step1
INFO Request: POST /wd/hub/session 
 - data:  {"desiredCapabilities":{"browserName":"chrome","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","name":"Test"}} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":156}
INFO Response 200 POST /wd/hub/session{ state: null,
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 906114952,
  value: 
   { applicationCacheEnabled: false,
     rotatable: false,
     mobileEmulationEnabled: false,
     chrome: { userDataDir: 'C:\\Users\\UserName\\AppData\\Local\\Temp\\scoped_dir11104_9234' },
     takesHeapSnapshot: true,
     databaseEnabled: false,
     handlesAlerts: true,
     hasTouchScreen: false,
     version: '46.0.2490.86',
     platform: 'XP',
     browserConnectionEnabled: false,
     nativeEvents: true,
     acceptSslCerts: true,
     'webdriver.remote.sessionid': '7ce98313-4f02-415b-b9f4-706caad9502a',
     locationContextEnabled: true,
     webStorageEnabled: true,
     browserName: 'chrome',
     takesScreenshot: true,
     javascriptEnabled: true,
     cssSelectorsEnabled: true },
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Got sessionId from selenium 7ce98313-4f02-415b-b9f4-706caad9502a
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/url 
 - data:  {"url":"http://nightwatchjs.org"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":33}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/url{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 1293497312,
  value: null,
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
LOG     › Completed command url (1845 ms)
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/elements{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 53363419,
  value: [ { ELEMENT: '0' } ],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
 ? Element <a[href='/guide']> was present after 39 milliseconds.
LOG     › Completed command waitForElementPresent (41 ms)
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 1692968041,
  value: { ELEMENT: '0' },
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element/0/click 
 - data:   
 - headers:  {"Content-Length":0}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element/0/click{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 1184330684,
  value: null,
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
LOG     › Completed command click (217 ms)
INFO FINISHED

OK. 1 assertions passed. (4.38s)

Running:  step2
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/elements{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 1736264939,
  value: [ { ELEMENT: '1' } ],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
 ? Element <a[href='/api']> was present after 46 milliseconds.
LOG     › Completed command waitForElementPresent (50 ms)
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 974876422,
  value: { ELEMENT: '1' },
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element/1/click 
 - data:   
 - headers:  {"Content-Length":0}
INFO Response 200 POST /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a/element/1/click{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 1537096375,
  value: null,
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
 ? Failed [ok]: (false == true)  - expected "true" but got: false
    at Object.ok (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\core\api.js:67:24)
    at Object.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\Tests\Containers\CreateContainerTest.js:24:32)
    at Object.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\api\element-commands.js:360:20)
    at HttpRequest.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\index.js:322:20)
    at emitTwo (events.js:87:13)
    at HttpRequest.emit (events.js:172:7)
    at HttpRequest.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\index.js:351:15)
    at emitThree (events.js:97:13)
    at HttpRequest.emit (events.js:175:7)
    at IncomingMessage.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\http\request.js:155:16)
LOG     › Completed command click (313 ms)
INFO Request: DELETE /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a 
 - data:   
 - headers:  {"Content-Length":0}
INFO Response 200 DELETE /wd/hub/session/7ce98313-4f02-415b-b9f4-706caad9502a{ state: 'success',
  sessionId: '7ce98313-4f02-415b-b9f4-706caad9502a',
  hCode: 652847339,
  value: null,
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO FINISHED
LOG     › Completed command end (1485 ms)
LOG     › Completed command session (1485 ms)
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
Retrying:  [Test] Test Suite  (1/1): 

Running:  step1
INFO Request: POST /wd/hub/session 
 - data:  {"desiredCapabilities":{"browserName":"chrome","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","name":"Test"}} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":156}
LOG     › Completed command end (2 ms)
INFO Request: POST /wd/hub/session/null/url 
 - data:  {"url":"http://nightwatchjs.org"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":33}
ERROR Response 500 POST /wd/hub/session/null/url{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 2134733118,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 1975851598,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
LOG     › Completed command url (27 ms)
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 1677417680,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 2082366743,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 619161909,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 20814536,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 1559750603,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 1357411805,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 1231016180,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 609872077,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 1207142962,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 1420183948,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
ERROR Response 500 POST /wd/hub/session/null/elements{ state: 'unhandled error',
  sessionId: 'null',
  hCode: 264664229,
  value: 
   { additionalInformation: '\nDriver info: driver.version: unknown',
     localizedMessage: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     supportUrl: null,
     systemInformation: 'System info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'',
     cause: null,
     suppressed: [],
     message: 'Build info: version: \'2.48.2\', revision: \'41bccdd\', time: \'2015-10-09 19:59:12\'\nSystem info: host: \'HostName\', ip: \'IP_ADDRESS\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_31\'\nDriver info: driver.version: unknown',
     hCode: 1501047866,
     class: 'org.openqa.selenium.remote.SessionNotFoundException',
     buildInformation: null },
  class: 'org.openqa.selenium.remote.Response',
  status: 13 }
INFO Response 200 POST /wd/hub/session{ state: null,
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1887271227,
  value: 
   { applicationCacheEnabled: false,
     rotatable: false,
     mobileEmulationEnabled: false,
     chrome: { userDataDir: 'C:\\Users\\UserName\\AppData\\Local\\Temp\\scoped_dir13704_20090' },
     takesHeapSnapshot: true,
     databaseEnabled: false,
     handlesAlerts: true,
     hasTouchScreen: false,
     version: '46.0.2490.86',
     platform: 'XP',
     browserConnectionEnabled: false,
     nativeEvents: true,
     acceptSslCerts: true,
     'webdriver.remote.sessionid': '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
     locationContextEnabled: true,
     webStorageEnabled: true,
     browserName: 'chrome',
     takesScreenshot: true,
     javascriptEnabled: true,
     cssSelectorsEnabled: true },
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Got sessionId from selenium 8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d
INFO FINISHED
No assertions ran.

Running:  step2
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 897575248,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1731896062,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 434050867,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 951505484,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 540483740,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 75521225,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 523192771,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1431311903,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 82881292,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1710707246,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1809700974,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1733255961,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1630477613,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1360932846,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1920415305,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1943952320,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 753340855,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1297467775,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1418355597,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 166768503,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 704422637,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1660034277,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/blog']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":50}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1668504352,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
 ? Timed out while waiting for element <a[href='/blog']> to be present for 5000 milliseconds.  - expected "found" but got: not found
    at Object.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\Tests\Containers\CreateContainerTest.js:27:21)
    at Object.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\api\element-commands.js:360:20)
    at HttpRequest.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\index.js:322:20)
    at emitTwo (events.js:87:13)
    at HttpRequest.emit (events.js:172:7)
    at HttpRequest.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\index.js:351:15)
    at emitThree (events.js:97:13)
    at HttpRequest.emit (events.js:175:7)
    at IncomingMessage.<anonymous> (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\http\request.js:155:16)
    at emitNone (events.js:72:20)
LOG     › Completed command waitForElementPresent (5403 ms)
INFO Request: DELETE /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d 
 - data:   
 - headers:  {"Content-Length":0}
INFO Response 200 POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 699498744,
  value: [],
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 DELETE /wd/hub/session/8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d{ state: 'success',
  sessionId: '8dcddc87-b9f4-41a0-9e1b-33e5efa0d06d',
  hCode: 1997378640,
  value: null,
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
INFO FINISHED
LOG     › Completed command end (1294 ms)
LOG     › Completed command session (1295 ms)

FAILED:  1 assertions failed (5.471s)
LOG     › Completed command end (0 ms)

----------------------------------------------------
TEST FAILURE: 1 assertions failed, 1 passed (13.599s)
 ? Containers\CreateContainerTest
   - step2
     Timed out while waiting for element <a[href='/blog']> to be present for 5000 milliseconds. - Expected "found" but got: "not found"

INFO Selenium process finished.
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/guide']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
 ? Timed out while waiting for element <a[href='/guide']> to be present for 15000 milliseconds.  - expected "found" but got: not found
    at Object.module.exports.step1 (c:\Users\UserName\Documents\GitHub\Source\Tests\Containers\CreateContainerTest.js:15:17)
    at Module.call (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\runner\module.js:63:34)
    at c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\runner\testcase.js:97:29
    at _fulfilled (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:796:13)
    at c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:556:49
    at runSingle (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:137:13)
    at flush (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:125:13)
    at doNTCallback0 (node.js:417:9)
LOG     › Completed command waitForElementPresent (15692 ms)
INFO FINISHED
LOG     › Completed command end (1 ms)
INFO Request: POST /wd/hub/session/null/elements 
 - data:  {"using":"css selector","value":"a[href='/api']"} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":49}
 ? Timed out while waiting for element <a[href='/api']> to be present for 15000 milliseconds.  - expected "found" but got: not found
    at Object.module.exports.step2 (c:\Users\UserName\Documents\GitHub\Source\Tests\Containers\CreateContainerTest.js:20:17)
    at Module.call (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\runner\module.js:63:34)
    at c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\lib\runner\testcase.js:97:29
    at _fulfilled (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:796:13)
    at c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:556:49
    at runSingle (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:137:13)
    at flush (c:\Users\UserName\Documents\GitHub\Source\node_modules\nightwatch\node_modules\q\q.js:125:13)
    at doNTCallback0 (node.js:417:9)
LOG     › Completed command waitForElementPresent (16026 ms)
INFO FINISHED
LOG     › Completed command end (0 ms)

Process finished with exit code 1

Config I'm using

module.exports = {
    "src_folders": [
        "Tests"
    ],
    "output_folder": "_results",
    "custom_commands_path": "Commands",
    "custom_assertions_path": "Assertions",
    "globals_path": "Global.js",
    "live_output": true,
    "parallel_process_delay": 10,
    "disable_colors": false,
    "test_workers": {
        "enabled": false,
        "workers": "auto"
    },
    "selenium": {
        "start_process": true,
        "server_path": "./node_modules/file_dependencies/selenium-server-standalone.jar",
        "log_path": "",
        "host": "127.0.0.1",
        "port": 4444,
        "cli_args": {
            "webdriver.chrome.driver": "./node_modules/file_dependencies/chromedriver.exe"
        }
    },
    "test_settings": {
        "default": {
            "launch_url": "http://localhost",
            "selenium_host": "127.0.0.1",
            "selenium_port": 4444,
            "silent": false,
            "disable_colors": false,
            "skip_testcases_on_fail": true
        },
        "chrome": {
            "desiredCapabilities": {
                "browserName": "chrome",
                "javascriptEnabled": true,
                "acceptSslCerts": true
            }
        }
    }
};
beatfactor commented 8 years ago

Thanks for the detailed bug report. It looks like this is happening only when you're using non-selenium assertions (like browser.assert.ok). I'll look into adding a fix for this soon.