-
Notifications
You must be signed in to change notification settings - Fork 197
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
[Feature Request] pause/resume webdriver #1199
Comments
“Pausing” the execution of a Selenium test can be done by the client by holding off the next HTTP request. Does that not fulfil your requirement? |
No, it does not pause the execution of the JS code, pause feature should behave like a breakpoint that acts wherever you are at the exact moment when you pause the webdriver. |
That sounds like something one would use CDP or the Firefox Devtools protocol for. |
@andreastt |
@edurenye @eromoe, I'd like to ask for some additional detail on what is being requested here, if you don't mind. Two things mainly:
If you have examples of things that could be made reliable but are now impossible/flaky, that would also be great. Disclaimer: I work on the Chrome team but not on ChromeDriver, but a similar request to this has come up internally and I'm trying to see if it's the same underlying need. Can't promise that anything will happen in the spec or in ChromeDriver. |
Well, I don't even work anymore for the company where I was working when I needed this, I changed company one month after I created this issue, so I don't really remember why I needed. I think at the moment I was running Scrapy and it was failing at some point to fetch something and I wanted to debug what was happening. But also I wanted this even earlier to debug some automatic test I did in Drupal and I wanted it to stop in the middle of a JS execution to debug it, something like it, don't recall why I couldn't use the non headless version of Chrome and just set a breakpoint. |
@foolip As I remember, I was crawling a js site . Maybe that site had some auto sliding blocks(js control) . I couldn't get all infomation stably if there is no pause function . Since the api may be very complicated I don't tend to mock request . I mean this pausing abbility is mainly tend to reduce my crawling work . You don't need to understand the api, only interact with frontend ui , easy found partern and fault . Pause dom changing and js execution are both need .This is also good for automated testing .
|
WICG/page-lifecycle#42 may address some of the use cases here. |
I see the need for a pause/resume functionality because it would make "atomic" transactions possible. Let's say you want to get all h2 elements whose text represents a prime number. With a pause/resume function, you could solve this problem. |
To be able to pause Selenium or any other application that uses webdriver, we need to add this feature to webdriver.
It's interesting to be able to pause the execution in a concrete moment, read something in the DOM or perform other tasks and be able to resume it again afterwards.
You can see more use cases in the original issue from Selenium: SeleniumHQ/selenium#5269
The text was updated successfully, but these errors were encountered: