dalekjs / dalek-internal-webdriver

[unmaintained] Webdriver bindings for DalekJS
MIT License
4 stars 5 forks source link

assert.exists Webdriver command fails, but Dalek reports success #13

Open niallo opened 10 years ago

niallo commented 10 years ago

Let's say we run an assert.exists with an invalid selector such as:

.assert.exists('h1:contains("FOoooooooooooooo")','LIAR!!!!!!!!')

The Webdriver response is pretty clear that there has been an error, but Dalek still things it succeeded:

☁ [WEBDRIVER] webdriver: 200 POST /session/5600592b61bb652f2f6175d96484529c/element
☁ [WEBDRIVER] webdriver: {"sessionId":"5600592b61bb652f2f6175d96484529c","status":12,"value":{"message":"invalid element state: Failed to execute 'querySelector' on 'Document': 'h1:contains(\"FOoooooooooooooo\")' is not a valid selector.\n  (Session info: chrome=36.0.1985.125)\n  (Driver info: chromedriver=2.9.248307,platform=Mac OS X 10.9.3 x86_64)"}}
✔ EXISTS LIAR!!!!!!!!
asciidisco commented 10 years ago

I see, I do not check for this status code properly, will be fixed in 0.0.9