-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expect.element().to.not.be.present throws error when using the new element() apis in v2 #2975
Comments
This is actually only a problem when using the new element() apis that were introduced in v2. I think if you just pass the selector directly, it works as expected: browser.url('http://google.com');
expect.element('#not-to-be-found').to.not.be.present; |
It is not working with elements described via xpaths as well in v2.
|
I see the same error with nightwatch 2.0.10 when I try
Error:
I can see on screen shot that DOM element with |
I got the same error with 2.0.10 by pass the selector directly: |
I have a problem that might be related. I am trying to upgrade nightwatch from 0.x to 2.x version right now. Unfortunately, we had some hacks implemented so I am not 100% sure my problem is caused by NW 2 but I think it is. I am waiting for element not to be present using
|
Experiencing same problem when upgrading from 1.7.8 to 2.1.4: this.page = client.page.MyPage(); |
has this been addressed/solved yet? |
Hello, |
Describe the bug
When testing assertion that element is not present on page, error is thrown when element is not found.
Sample test
sampleTest.js
Run with command
no arguments
Verbose output
debug.log
Configuration
nightwatch.json
no special config
Your Environment
nightwatch --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: