nightwatch: Changed error handling: Test always fails when `click` returns error, even when callback handles it
I am in the process of attempting to update our large nightwatch codebase to v1.
We have a custom command that attempts to click on a element, but sometimes the element is not clickable. In previous versions of nightwatch we would pass a callback into click and test the result status, but in v1 there appears to be no way to pass the test as the error is always recorded as a test fail before the callback in invoked.
What I am looking for is a way to stop nightwatch automatically failing the test (I believe the relevant nightwatch code is here) so that I can handle the outcome. In our case we re-try the click and it works.
A fabricated example using the default config taken straight from the docs:
module.exports = {
'step one: navigate to google' : function (browser) {
browser
.url('http://www.google.com')
.waitForElementVisible('body', 1000)
.setValue('input[type=text]', 'nightwatch')
.waitForElementVisible('input[name=btnK]', 1000)
.click('#footc', (result) => {
// in nightwatch v1 the test has already been failed, not in v0.9n
console.log(result.status === 0 ? 'Yay it worked' : 'not to worry, lets continue');
});
},
'step two: click input' : function (browser) {
browser
.click('input[name=btnK]')
.pause(1000)
.assert.containsText('#main', 'Night Watch')
.end();
}
};
I detail the full verbose output below, but in short the .click('#footc' call returns an error which is correctly reported to the callback but not after failing the test. I was also surprised to see it continue on to the next test case even after the fail.
This is with node v10.14.0 and nightwatch v1.0.16
The full verbose output using nightwatch v1.0.16 is here
master npx nightwatch --verbose
Starting ChromeDriver on port 9515...
ChromeDriver up and running on port 9515 with pid: 73487 (238ms).
[Test] Test Suite
=================
Request POST /session
{ desiredCapabilities:
{ browserName: 'chrome',
acceptSslCerts: true,
platform: 'ANY',
name: 'Test' } }
Response 200 POST /session (1677ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value:
{ acceptInsecureCerts: false,
acceptSslCerts: false,
applicationCacheEnabled: false,
browserConnectionEnabled: false,
browserName: 'chrome',
chrome:
{ chromedriverVersion: '2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189)',
userDataDir:
'/var/folders/z1/ntw_xhw15r7b_t8s183nxpm40000gn/T/.org.chromium.Chromium.6mdrXG' },
cssSelectorsEnabled: true,
databaseEnabled: false,
'goog:chromeOptions': { debuggerAddress: 'localhost:53880' },
handlesAlerts: true,
hasTouchScreen: false,
javascriptEnabled: true,
locationContextEnabled: true,
mobileEmulationEnabled: false,
nativeEvents: true,
networkConnectionEnabled: false,
pageLoadStrategy: 'normal',
platform: 'Mac OS X',
proxy: {},
rotatable: false,
setWindowRect: true,
strictFileInteractability: false,
takesHeapSnapshot: true,
takesScreenshot: true,
timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },
unexpectedAlertBehaviour: 'ignore',
version: '71.0.3578.98',
webStorageEnabled: true } }
Received session with ID: 31cfb3ecd0bcddf155857298413176b0
→ Running [before]:
→ Completed [before].
Running: step one: navigate to google
→ Running [beforeEach]:
→ Completed [beforeEach].
→ Running command: url ('http://www.google.com')
Request POST /session/31cfb3ecd0bcddf155857298413176b0/url
{ url: 'http://www.google.com' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/url (1941ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: null }
→ Completed command url ('http://www.google.com') (1941ms)
→ Running command: waitForElementVisible ('body', 1000)
Request POST /session/31cfb3ecd0bcddf155857298413176b0/elements
{ using: 'css selector', value: 'body' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/elements (13ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: [ { ELEMENT: '0.8653910619456748-1' } ] }
Request GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-1/displayed
Response 200 GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-1/displayed (11ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: true }
✔ Element <body> was visible after 25 milliseconds.
→ Completed command waitForElementVisible ('body', 1000) (27ms)
→ Running command: setValue ('input[type=text]', 'nightwatch')
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element
{ using: 'css selector', value: 'input[type=text]' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element (12ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: { ELEMENT: '0.8653910619456748-2' } }
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-2/value
{ value: [ 'n', 'i', 'g', 'h', 't', 'w', 'a', 't', 'c', 'h' ] }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-2/value (87ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: null }
→ Completed command setValue ('input[type=text]', 'nightwatch') (100ms)
→ Running command: waitForElementVisible ('input[name=btnK]', 1000)
Request POST /session/31cfb3ecd0bcddf155857298413176b0/elements
{ using: 'css selector', value: 'input[name=btnK]' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/elements (11ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value:
[ { ELEMENT: '0.8653910619456748-3' },
{ ELEMENT: '0.8653910619456748-4' } ] }
Warning: More than one element (2) found for <input[name=btnK]> with selector: "input[name=btnK]". Only the first one will be used.
Request GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/displayed
Response 200 GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/displayed (12ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: false }
Request GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/displayed
Response 200 GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/displayed (13ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: true }
✔ Element <input[name=btnK]> was visible after 539 milliseconds.
→ Completed command waitForElementVisible ('input[name=btnK]', 1000) (539ms)
→ Running command: click ('#footc', [Function])
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element
{ using: 'css selector', value: '#footc' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element (13ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: { ELEMENT: '0.8653910619456748-5' } }
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-5/click
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-5/click (40ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 13,
value:
{ message:
'unknown error: Element <div id="footc">...</div> is not clickable at point (600, 452). Other element would receive the click: <span>...</span>',
error:
[ ' (Session info: chrome=71.0.3578.98)',
' (Driver info: chromedriver=2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189),platform=Mac OS X 10.13.6 x86_64)' ] } }
Error while running .clickElement() protocol action: unknown error: Element <div id="footc">...</div> is not clickable at point (600, 452). Other element would receive the click: <span>...</span>
An error occurred while running .click() command on <#footc>: unknown error: Element <div id="footc">...</div> is not clickable at point (600, 452). Other element would receive the click: <span>...</span>
at process._tickCallback (internal/process/next_tick.js:68:7)
not to worry, lets continue
→ Completed command click ('#footc', [Function]) (55ms)
→ Running [afterEach]:
→ Completed [afterEach].
FAILED: 1 errors and 2 passed (2.666s)
Running: step two: click input
→ Running [beforeEach]:
→ Completed [beforeEach].
→ Running command: click ('input[name=btnK]')
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element
{ using: 'css selector', value: 'input[name=btnK]' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element (11ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: { ELEMENT: '0.8653910619456748-3' } }
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/click
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element/0.8653910619456748-3/click (3384ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: null }
→ Completed command click ('input[name=btnK]') (3398ms)
→ Running command: pause (1000)
→ Completed command pause (1000) (1001ms)
→ Running command: assert.containsText ('#main', 'Night Watch')
→ Running command: getText ('#main', [Function])
Request POST /session/31cfb3ecd0bcddf155857298413176b0/element
{ using: 'css selector', value: '#main' }
Response 200 POST /session/31cfb3ecd0bcddf155857298413176b0/element (13ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: { ELEMENT: '0.06906494467064572-1' } }
Request GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.06906494467064572-1/text
Response 200 GET /session/31cfb3ecd0bcddf155857298413176b0/element/0.06906494467064572-1/text (325ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value:
'Search modes\nAllImagesNewsVideosShoppingMore\nSettings\nTools\nSafeSearch on\nAbout 10,500,000 results (0.63 seconds) \n\n\nA privacy reminder from Google\nREMIND ME LATER\nREVIEW\nSearch Results\nWeb results\nNightwatch.js | Node.js powered End-to-End testing framework\nnightwatchjs.org/\nWrite efficient and straightforward end-to-end tests in Node.js which run against a Selenium/WebDriver server.\nWhat is Nightwatch? · Configuration · Using Nightwatch · Extending Nightwatch\nNightcloud.io | Nightwatch.js cloud testing platform\nnightcloud.io/\nNightCloud.io. Run and manage your Nightwatch tests with absolutely no hassle, no config, no nonsense. NightCloud.io. About ...\nGitHub - nightwatchjs/nightwatch: Automated testing and continuous ...\nhttps://github.com/nightwatchjs/nightwatch\nAutomated testing framework powered by Node.js and using W3C Webdriver (formerly Selenium). Nightwatch is a complete and integrated solution for end-to-end testing of web applications and websites, and also for Node.js unit and integration testing. ... Install Node.js (together with ...\nNight Watch (2004 film) - Wikipedia\nhttps://en.wikipedia.org/wiki/Night_Watch_(2004_film)\nNight Watch is a 2004 Russian urban fantasy supernatural thriller film written by Timur Bekmambetov and Laeta Kalogridis and directed by Timur Bekmambetov.\nBased on: The Night Watch; by Sergei Lukyan... Production company: Channel One Russia; Ba...\nMusic by: Yuri Poteyenko Budget: $4.2 million\nPlot · Cast · Production · Release\nPeople also ask\nWhat is a Nightwatch?\n\nWhat is Testcafe?\n\nWhat is e2e testing?\n\nFeedback\nWeb results\nnightwatch - npm\nhttps://www.npmjs.com/package/nightwatch\n24 Apr 2018 - Easy to use Node.js based End-to-End testing solution for browser based apps and websites, using the W3C WebDriver API.\nNochnoy dozor (2004) - IMDb\nhttps://www.imdb.com/title/tt0403358/\nRating: 6.5/10 - 50,140 votes\nTaglines: All That Stands Between Light And Darkness Is The Night Watch. ... In Night Watch the line between good and evil is often blurred. The lead character ...\nNightwatch.js Makes Software Test Scripts Fun and Easy | Sauce Labs\nhttps://saucelabs.com/blog/nightwatchjs-makes-software-test-scripts-fun-and-easy\n15 Feb 2018 - Nightwatch.js is a Selenium wrapper that provides several out-of-the-box commands and assertions for performing various operations on the ...\nRembrandt masterpiece The Night Watch to be restored under world\'s ...\nhttps://www.theguardian.com/.../the-night-watch-rembrandt-painting-to-be-restored-und...\n16 Oct 2018 - The Night Watch by Rembrandt, one of the world\'s most spectacular paintings, is to be restored under the world\'s gaze at the Rijksmuseum in ...\nAutomate your UI testing with Nightwatch - Juri Strumpflohner\nhttps://juristr.com/blog/2014/02/nightwatch-test-automation/\nAutomate your UI testing with Nightwatch. Automated UI testing awesomeness based on Node and Selenium. Wanna keep up to date with the latest webdev ...\nImages for nightwatch\nMore images for nightwatch\nReport images\nDirected by Timur Bekmambetov\nDay Watch\nAbraham Lincoln: V...\nWanted\nBen‑Hur\nThe Arena\nVampire movies\nView 20+ more\nBlade\nUnderworld\nCirque du Freak: The Vampire\'s...\nVampire\'s Kiss\nThe Forsaken\nBlade: Trinity\nPerfect Creature\nRussian language movies\nView 20+ more\nA Rough Draft\nViy\nWolfhound\nDragon ‑ Love Is A Scary Tale\nAugust Eighth\nViy\nDead Daughters\nSearches related to nightwatch\nnightwatch testing\nnightwatch tutorial for beginners\nnightwatch.js examples\nnightwatch globals\nnightwatch cucumber\nnightwatch vs cypress\nnightwatch js wiki\nnightwatch vs selenium\nPage navigation\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\nNext\nComplementary results\nKnowledge result\nNight Watch\n2004 ‧ Fantasy/Thriller ‧ 1h 55m\n6.5/10\nIMDb\n58%\nMetacritic\n60%\nRotten Tomatoes\n83% liked this film\nGoogle users\nDescription\nHundreds of years ago there was a battle between the Warriors of Light and the evil Warriors of Darkness. Realizing that they were evenly matched, the two sides agreed to a truce. The fragile peace between good and evil is kept in place by two groups: the Day Watch and the Night Watch, each monitori… MORE\nRelease date: 7 October 2005 (United Kingdom)\nDirector: Timur Bekmambetov\nStory by: Sergei Lukyanenko\nEditor: Dmitriy Kiselev\nLanguages: Russian, English, German\nAvailable on\nFrom £3.49\nYouTube\nFrom £3.49\nGoogle Play Movies & TV\nAudience reviews\nNEW\nYour Review\nPosting publicly.\nWhat do you think about this movie?\nBE THE FIRST TO REVIEW\nHelp other viewers of this page\nCast\nView 15+ more\nKonstantin Khabensky\nAnton\nMariya Poroshina\nSvetlana\nJeanna Friske\nAlice Donnikova\nAleksey Chadov\nKostya\nPeople also search for\nView 20+ more\nDay Watch\n2006\nA Rough Draft\n2018\nBlade\n1998\nUnderworld\n2003\nFeedback\nClaim this knowledge panel\nSee results about\nThe Night Watch (Painting by Rembrandt)\nMilitia Company of District II under the Command of Captain Frans ...\nFooter links\nUnited Kingdom Bishopbriggs - From your Internet address - Use precise location - Learn more\nHelpSend feedbackPrivacyTerms' }
✔ Testing if element <#main> contains text: "Night Watch" - 344 ms.
→ Completed command getText ('#main', [Function]) (342ms)
→ Completed command assert.containsText ('#main', 'Night Watch') (345ms)
→ Running command: end ()
→ Running command: session ('delete', [Function])
Request DELETE /session/31cfb3ecd0bcddf155857298413176b0
Response 200 DELETE /session/31cfb3ecd0bcddf155857298413176b0 (52ms)
{ sessionId: '31cfb3ecd0bcddf155857298413176b0',
status: 0,
value: null }
→ Completed command end () (55ms)
→ Completed command session ('delete', [Function]) (53ms)
→ Running [afterEach]:
→ Completed [afterEach].
OK. 1 assertions passed. (4.8s)
→ Running [after]:
→ Completed [after].
_________________________________________________
TEST FAILURE: 1 error during execution 0 assertions failed, 3 passed. 9.438s
✖ test
– step one: navigate to google (2.666s)
An error occurred while running .click() command on <#footc>: unknown error: Element <div id="footc">...</div> is not clickable at point (600, 452). Other element would receive the click: <span>...</span>
at process._tickCallback (internal/process/next_tick.js:68:7)
Wrote report file to: tests_output/CHROME_71.0.3578.98_Mac_OS_X_test.xml.
Wrote log file to: /Users/davidrankin/dev/nearform/nightwatch-v1-test/chromedriver.log.
ChromeDriver process closed.
In version v0.9.21 this same test passes without issue (verbose logs below). Is this an intentional change in error handling?
I also notice that attempts to retrieve an element that does not exist, using element, logs where it did not previously. In the same vain, is there any way to signal to nightwatch that such a call is expected to sometimes fail?
v0.9 ● npx nightwatch --verbose
[Test] Test Suite
=====================
Running: step one: navigate to google
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":126}
INFO Response 200 POST /wd/hub/session (2472ms) { status: 0,
sessionId: '2ecf7086798d549dfbe53e09468724c2',
value:
{ acceptInsecureCerts: false,
acceptSslCerts: false,
applicationCacheEnabled: false,
browserConnectionEnabled: false,
browserName: 'chrome',
chrome:
{ chromedriverVersion: '2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052)',
userDataDir:
'/var/folders/z1/ntw_xhw15r7b_t8s183nxpm40000gn/T/.org.chromium.Chromium.AnEOgF' },
cssSelectorsEnabled: true,
databaseEnabled: false,
'goog:chromeOptions': { debuggerAddress: 'localhost:58229' },
handlesAlerts: true,
hasTouchScreen: false,
javascriptEnabled: true,
locationContextEnabled: true,
mobileEmulationEnabled: false,
nativeEvents: true,
networkConnectionEnabled: false,
pageLoadStrategy: 'normal',
platform: 'Mac OS X',
rotatable: false,
setWindowRect: true,
takesHeapSnapshot: true,
takesScreenshot: true,
unexpectedAlertBehaviour: '',
version: '71.0.3578.98',
webStorageEnabled: true,
'webdriver.remote.sessionid': '2ecf7086798d549dfbe53e09468724c2' } }
INFO Got sessionId from selenium 2ecf7086798d549dfbe53e09468724c2
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/url
- data: {"url":"http://www.google.com"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":31}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/url (2278ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: null }
LOG → Completed command url (2280 ms)
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/elements
- data: {"using":"css selector","value":"body"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":39}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/elements (16ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: [ { ELEMENT: '0.1207420267995325-1' } ] }
INFO Request: GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-1/displayed
- data:
- headers: {"Accept":"application/json"}
INFO Response 200 GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-1/displayed (14ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: true }
✔ Element <body> was visible after 32 milliseconds.
LOG → Completed command waitForElementVisible (32 ms)
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element
- data: {"using":"css selector","value":"input[type=text]"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element (15ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: { ELEMENT: '0.1207420267995325-2' } }
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-2/value
- data: {"value":["n","i","g","h","t","w","a","t","c","h"]}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-2/value (97ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: null }
LOG → Completed command setValue (114 ms)
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/elements
- data: {"using":"css selector","value":"input[name=btnK]"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/elements (14ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value:
[ { ELEMENT: '0.1207420267995325-3' },
{ ELEMENT: '0.1207420267995325-4' } ] }
Warn: WaitForElement found 2 elements for selector "input[name=btnK]". Only the first one will be checked.
INFO Request: GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/displayed
- data:
- headers: {"Accept":"application/json"}
INFO Response 200 GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/displayed (16ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: false }
INFO Request: GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/displayed
- data:
- headers: {"Accept":"application/json"}
INFO Response 200 GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/displayed (11ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: true }
✔ Element <input[name=btnK]> was visible after 545 milliseconds.
LOG → Completed command waitForElementVisible (545 ms)
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element
- data: {"using":"css selector","value":"#footc"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":41}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element (16ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: { ELEMENT: '0.1207420267995325-5' } }
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-5/click
- data:
- headers: {"Content-Length":0}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-5/click (37ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 13,
value:
{ message:
'unknown error: Element <div id="footc">...</div> is not clickable at point (600, 452). Other element would receive the click: <span>...</span>\n (Session info: chrome=71.0.3578.98)\n (Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.13.6 x86_64)' } }
not to worry, lets continue
LOG → Completed command click (55 ms)
INFO FINISHED
OK. 2 assertions passed. (5.503s)
Running: step two: click input
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element
- data: {"using":"css selector","value":"input[name=btnK]"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":51}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element (13ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: { ELEMENT: '0.1207420267995325-3' } }
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/click
- data:
- headers: {"Content-Length":0}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.1207420267995325-3/click (2351ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: null }
LOG → Completed command click (2364 ms)
LOG → Completed command pause (1006 ms)
INFO Request: POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element
- data: {"using":"css selector","value":"#main"}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":40}
INFO Response 200 POST /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element (16ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: { ELEMENT: '0.7955349765549724-1' } }
INFO Request: GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.7955349765549724-1/text
- data:
- headers: {"Accept":"application/json"}
INFO Response 200 GET /wd/hub/session/2ecf7086798d549dfbe53e09468724c2/element/0.7955349765549724-1/text (314ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value:
'Search modes\nAllImagesNewsVideosShoppingMore\nSettings\nTools\nSafeSearch on\nAbout 10,500,000 results (0.71 seconds) \n\n\nA privacy reminder from Google\nREMIND ME LATER\nREVIEW\nSearch Results\nWeb results\nNightwatch.js | Node.js powered End-to-End testing framework\nnightwatchjs.org/\nWrite efficient and straightforward end-to-end tests in Node.js which run against a Selenium/WebDriver server.\nWhat is Nightwatch? · Configuration · Using Nightwatch · Extending Nightwatch\nNightcloud.io | Nightwatch.js cloud testing platform\nnightcloud.io/\nNightCloud.io. Run and manage your Nightwatch tests with absolutely no hassle, no config, no nonsense. NightCloud.io. About ...\nGitHub - nightwatchjs/nightwatch: Automated testing and continuous ...\nhttps://github.com/nightwatchjs/nightwatch\nAutomated testing framework powered by Node.js and using W3C Webdriver (formerly Selenium). Nightwatch is a complete and integrated solution for end-to-end testing of web applications and websites, and also for Node.js unit and integration testing. ... Install Node.js (together with ...\nNight Watch (2004 film) - Wikipedia\nhttps://en.wikipedia.org/wiki/Night_Watch_(2004_film)\nNight Watch is a 2004 Russian urban fantasy supernatural thriller film written by Timur Bekmambetov and Laeta Kalogridis and directed by Timur Bekmambetov.\nBased on: The Night Watch; by Sergei Lukyan... Production company: Channel One Russia; Ba...\nMusic by: Yuri Poteyenko Budget: $4.2 million\nPlot · Cast · Production · Release\nPeople also ask\nWhat is a Nightwatch?\n\nWhat is Testcafe?\n\nWhat is e2e testing?\n\nFeedback\nWeb results\nnightwatch - npm\nhttps://www.npmjs.com/package/nightwatch\n24 Apr 2018 - Easy to use Node.js based End-to-End testing solution for browser based apps and websites, using the W3C WebDriver API.\nNochnoy dozor (2004) - IMDb\nhttps://www.imdb.com/title/tt0403358/\nRating: 6.5/10 - 50,140 votes\nTaglines: All That Stands Between Light And Darkness Is The Night Watch. ... In Night Watch the line between good and evil is often blurred. The lead character ...\nNightwatch.js Makes Software Test Scripts Fun and Easy | Sauce Labs\nhttps://saucelabs.com/blog/nightwatchjs-makes-software-test-scripts-fun-and-easy\n15 Feb 2018 - Nightwatch.js is a Selenium wrapper that provides several out-of-the-box commands and assertions for performing various operations on the ...\nRembrandt masterpiece The Night Watch to be restored under world\'s ...\nhttps://www.theguardian.com/.../the-night-watch-rembrandt-painting-to-be-restored-und...\n16 Oct 2018 - The Night Watch by Rembrandt, one of the world\'s most spectacular paintings, is to be restored under the world\'s gaze at the Rijksmuseum in ...\nAutomate your UI testing with Nightwatch - Juri Strumpflohner\nhttps://juristr.com/blog/2014/02/nightwatch-test-automation/\nAutomate your UI testing with Nightwatch. Automated UI testing awesomeness based on Node and Selenium. Wanna keep up to date with the latest webdev ...\nRembrandt\'s Night Watch to be restored in public - BBC News\nhttps://www.bbc.co.uk/news/world-europe-45874854\n16 Oct 2018 - Rembrandt\'s masterpiece The Night Watch is to stay on public display as part of the Rijksmuseum\'s biggest restoration project in its history.\nDirected by Timur Bekmambetov\nDay Watch\nAbraham Lincoln: V...\nWanted\nBen‑Hur\nThe Arena\nVampire movies\nView 20+ more\nBlade\nUnderworld\nCirque du Freak: The Vampire\'s...\nVampire\'s Kiss\nThe Forsaken\nBlade: Trinity\nPerfect Creature\nRussian language movies\nView 20+ more\nA Rough Draft\nViy\nWolfhound\nDragon ‑ Love Is A Scary Tale\nAugust Eighth\nViy\nDead Daughters\nSearches related to nightwatch\nnightwatch testing\nnightwatch tutorial for beginners\nnightwatch.js examples\nnightwatch globals\nnightwatch cucumber\nnightwatch vs cypress\nnightwatch js wiki\nnightwatch vs selenium\nPage navigation\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\nNext\nComplementary results\nKnowledge result\nNight Watch\n2004 ‧ Fantasy/Thriller ‧ 1h 55m\n6.5/10\nIMDb\n58%\nMetacritic\n60%\nRotten Tomatoes\n83% liked this film\nGoogle users\nDescription\nHundreds of years ago there was a battle between the Warriors of Light and the evil Warriors of Darkness. Realizing that they were evenly matched, the two sides agreed to a truce. The fragile peace between good and evil is kept in place by two groups: the Day Watch and the Night Watch, each monitori… MORE\nRelease date: 7 October 2005 (United Kingdom)\nDirector: Timur Bekmambetov\nStory by: Sergei Lukyanenko\nEditor: Dmitriy Kiselev\nLanguages: Russian, English, German\nAvailable on\nFrom £3.49\nYouTube\nFrom £3.49\nGoogle Play Movies & TV\nAudience reviews\nNEW\nYour Review\nPosting publicly.\nWhat do you think about this movie?\nBE THE FIRST TO REVIEW\nHelp other viewers of this page\nCast\nView 15+ more\nKonstantin Khabensky\nAnton\nMariya Poroshina\nSvetlana\nJeanna Friske\nAlice Donnikova\nAleksey Chadov\nKostya\nPeople also search for\nView 20+ more\nDay Watch\n2006\nA Rough Draft\n2018\nBlade\n1998\nUnderworld\n2003\nFeedback\nClaim this knowledge panel\nSee results about\nThe Night Watch (Painting by Rembrandt)\nMilitia Company of District II under the Command of Captain Frans ...\nFooter links\nUnited Kingdom Bishopbriggs - From your Internet address - Use precise location - Learn more\nHelpSend feedbackPrivacyTerms' }
✔ Testing if element <#main> contains text: "Night Watch".
LOG → Completed command getText (333 ms)
INFO Request: DELETE /wd/hub/session/2ecf7086798d549dfbe53e09468724c2
- data:
- headers: {"Content-Length":0}
INFO Response 200 DELETE /wd/hub/session/2ecf7086798d549dfbe53e09468724c2 (54ms) { sessionId: '2ecf7086798d549dfbe53e09468724c2',
status: 0,
value: null }
LOG → Completed command end (55 ms)
LOG → Completed command session (55 ms)
INFO FINISHED
OK. 1 assertions passed. (3.761s)
OK. 3 total assertions passed. (9.339s)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (3 by maintainers)
This is not working for me, I still have these errors, even though I set on the elements object the property suppressNotFoundErrors : true avatar:{ selector: ‘#user-menu’, suppressNotFoundErrors : true } ,
Error while running .clickElement() protocol action: unknown error: Element <li data-v-42065957="" data-v-45ba6d12="" class="nav-item dropdown avatar" id="user-menu">...</li> is not clickable at point (1884, 30). Other element would receive the click: <div id="edit-account-modal" role="dialog" tabindex="-1" class="modal show d-block" aria-modal="true" style="">...</div>I have the same problem, but a different use case: I have a button in a web app which zooms out an image. When the image is fully zoomed out, the button becomes disabled, which applies the
pointer-events: noneCSS rule to it. Using Nightwatch, I want to test that clicking the button once the image is fully zoomed out does not zoom the image out even more. However, there seems to be no straightforward way to do this without failing the test in Nightwatch 1.1 because the test will fail withError while running .clickElement() protocol action: unknown error: Element <div class="zoom-action disabled">...</div> is not clickable at point (351, 1034). Other element would receive the click: <div class="zoom-wrapper">...</div>.This is a somewhat common pattern in our codebase.
Nightwatch version: 1.1.3 Node.js version: 10.15.3 Tested on macOS 10.14.4 and Ubuntu 14.04 Using ChromeDriver 2.46