-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
waitForElementNotPresent
inside section waits for the section element to be gone
#3181
Comments
When we upgrade to Selenium 4.5 we will be able to take better advantage of the new Select package that they ship and allow us to solve this problem better. |
We experience exactly same issue. Wanted to do an upgrade from 1.7.13 to 2.4.2. Mostly seems to work, but .waitForElementNotPresent() does not. example method inside a subsection: We are waiting for loading indicator which should be not present after data model are loaded. `
} This behavior make no sense, and should be fixed as it was in V1. |
Can you please elaborate about the workaround ? I found this bug very limitating, practically I would have to flatten whole page-object structure just to fix the behavior for us. I'm very surprised that nobody really care for half a year. |
@AutomatedTester I have updated to the latest nightwatch version (2.6.10) which uses |
@beatfactor I have seen that you were fixing many issues recently, but this regression in behavior stays intact. Is there anything which is blocking the fix like better issue description with example ? I do not understand why this regression has zero attention while other minor bugs were fixed in no time. |
…inside section for the section element to be gone
…inside section for the section element to be gone
…inside section for the section element to be gone
… the section element to be gone
Describe the bug
Our application uses https://mui.com/ as a component library. It has standard components for displaying Dialogs and Select inputs.
Both components will create a separate DOM hierarchy under the
body
when you open the Dialog or the Select dropdown.Once the Dialog or Select dropdown is gone, the DOM hierarchy is also gone.
For end-to-end testing we are currently using version
1.7.11
.In order to test scenarios where we have a Dialog and a Select inside of it we are often relying on sections in nightwatch.
Since the Dialog and Select components will create a separate DOM hierarchy under the
body
when you open them we are usingbody
as a selector for the section. Using that we can both target the Dialog body and the Select dropdown "inside" the Dialog.Selecting a value in the Select dropdown inside the Dialog will close the Select dropdown and therefore will remove the separate DOM hierarchy.
This has worked in version
1.7.11
.The problem is that after an upgrade to version
2.1.4
this no longer works.All tests that use this section with
body
selector will run into a timeout because thebody
is still available even though I only expect the Select dropdown to be gone.The test below uses a custom codesandbox that demonstrates this scenario: https://t4v67b.csb.app/
I have also attached the verbose output of version
2.1.4
and1.7.11
for comparison.Sample test
tests/test.e2e.js
pages/homepage.js
Run with command
Verbose output
2.1.4
debug.log
Verbose output
1.7.11
debug.log
Configuration
nightwatch.json
I have used the automatically generated default config and adjusted
src_folders
andpage_objects_path
.Your Environment
nightwatch --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: