maxgalbu / nightwatch-custom-commands-assertions

Nightwatch.js custom commands and assertions
MIT License
136 stars 32 forks source link

Unexpected Present #26

Open bjellesma opened 6 years ago

bjellesma commented 6 years ago

Hi,

I was using jqueryElementPresent and discovered that if the selector has a syntax error, then the method will still conclude that the element is present.

For example, I was using the following .assert.jqueryElementPresent('tr.visitorRow:has(> td.visitorName:contains('+visitor["name"]+')))')

Even though the selector has an extra ), the statement would evaluate that the element is present even though it isn't. I'm not sure if this is expected behavior or something that you may want to create an exception for.

Thanks!