-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bugfixes for DevTools package #4459
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4459 +/- ##
==========================================
+ Coverage 99.25% 99.26% +<.01%
==========================================
Files 188 188
Lines 4725 4754 +29
Branches 1010 1015 +5
==========================================
+ Hits 4690 4719 +29
Misses 32 32
Partials 3 3
Continue to review full report at Codecov.
|
So I think I added necessary unit tests, this is ready for review. |
packages/webdriverio/src/commands/element/isDisplayedInViewport.js
Outdated
Show resolved
Hide resolved
@mgrybyk I removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some comments, I think we should be more strict when verifying page titles to make sure that navigation has actually happened when expected
No because this is not part of the protocol, technically if you click on a link in WebDriver and get the title, chances are that you still get the old title. Therefor it is just important for me here, that we get a result |
This will also fix the flaky tests on master |
Why then with Webdriver the test always passing (waiting for page to load?) when click triggers navigation while with devtools protocol it always fail? |
Do you have a reproducible example? |
@christian-bromann
always fails in devtools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one #4447 is failing now because isElementDisplayed
is not implemented when doing $('#foobarTest').waitForDisplayed(4000)
I increased the timeout for frame navigation and updated the e2e test to actually check the title. What do you think? |
Taking a look. |
@christian-bromann to be honest I don't like it, now every click takes one second, also not only click can lead to site loading, ex: it can be any javascript call. What if we fully remove everything related to site load from click and implement something like webdriver's page load strategy? As far as I've understood if page is loading next command call is waiting for page to load. Is it possible to implement something similar with puppeteer? before executing any command verify if |
@mgrybyk I agree with you, I wasn't really happy with it either. I check the Puppeteer API and found that they have an |
It is better now, thank you! However I still have to wait for page to load manually and I think it can be improved. Here is what I've figured out while debugging:
Here is an output:
What I wanted to say, do you think it makes sense to wait for It may be done with another PR later on but I think it's quite useful. |
Good call @mgrybyk, added this to the PR, please have a look |
Hey, I'll review later today. |
87471f6
to
1733db1
Compare
@christian-bromann I'm getting Looking for steps to reproduce |
Execution fails, browser stays opened.
|
nevermind, I see the error in the build .. taking a look |
Added a fix for it |
Proposed changes
This patch has fixes for #4443, #4447 and #4448.
Types of changes
Checklist
Further comments
Not quite done yet, have to check how I can incorporate tests for these fixes.
Reviewers: @webdriverio/project-committers