-
Notifications
You must be signed in to change notification settings - Fork 35
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
Clarify navigation automation #342
Comments
Thanks for filing this issue! Can you state what the actual problem is, though? This all sounds like it's working more or less as I would expect. It's not expected that navigations without prerendering behave the same as navigations with prerendering; indeed, we definitely want them to behave differently, so that web developers can write tests which check that prerendering is working!
I'm not sure I understand this point. They are distinguishable from JavaScript, e.g. via Is the idea that it would be helpful to make them easier to distinguish, without running JavaScript? That seems vaguely like a good idea to me.
Similarly, this is also detectable using JavaScript (e.g. with the |
This is a problem for test developers who are not aware of prerendering. For them enabling prerendering will be a breaking and unexpected change, as it will cause switching traversables without any visual indication of that. The developer can be confused by that, and would require deep debugging in order to figure out that it's prerendering caused this.
The idea is to add an event or other mechanism, signaling that the prerendering happened, or that the switch has happened. This would allow testing frameworks communicate what is happened to the test developers. |
I'm unclear what scenario you're envisioning here. In what scenario is a developer adding prerendering to their site, and not aware that they're doing so?
As I mentioned, these events already exist. Can you explain what's unsatisfactory about the existing ones? |
As I understand, the assumption is that testers should always be aware if a site employs prerendering. However, this assumption may not always be true. E.g. in the following cases:
Testing frameworks (like Puppeteer or Selenium) could potentially address this by subscribing to relevant events and providing informative messages during runtime to aid debugging.
This relates to my proposal to extend BiDi with prerendering information. The A possible solution is to extend the WebDriver BiDi Implementing this minor change could reduce debugging time, increase awareness of prerendering, and enhance the overall testing experience. Please let me know if you find this proposal valuable, and I can provide more details on the implementation. Feel free to close the issue if you believe the problem described is too minor to warrant this change. |
I don't have a strong opinion on whether or not this is valuable. Do we have any testimony from web developers working with prerendering that are in the sort of situation you outline? My default for normal APIs would be to wait until we hear from such developers, but I don't have experience with how testing APIs are developed. Maybe they are usually developed in anticipation of web developer needs, instead of in reaction to them. So I'd rather leave that determination up to you. If you think this is valuable, and furthermore that it's valuable to get this information without running JavaScript in the context of the page, then spec updates to provide this information would be welcome as pull requests to this repository (or to the WebDriver BiDi spec, as appropriate). I don't know why you added a I'm also curious on your take on w3c/webdriver-bidi#321 . |
Oh, right, it should not have the
I guess that issue is a duplicate of this one, or this one a dup of that. |
Currently, from the WebDriver or WebDriver BiDi client's perspective, the prerendered traversable is not distinguishable from the traversable created by user. This can cause an observable difference in test behavior with prerendering on and off.
Scenario
Currently, there is no way for automation clients to detect the switch of the traversable when prerendering is enabled. This will lead to unexpected test results, when user navigates to a prerendered page and assumes the traversable has not changed.
The text was updated successfully, but these errors were encountered: