-
Notifications
You must be signed in to change notification settings - Fork 1.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
Execute_(async_)script JS input not available in debugger/sources tab. #2162
Comments
I also made sure to try and find if this issue was discussed anywhere before and to find reasons as to why it doesn't currently work. If this has been discussed before, please feel free to comment the link :) |
Thank you for the report. This is most likely related to https://bugzilla.mozilla.org/show_bug.cgi?id=1855013. Note that when you are using WebDriver BiDi this example will work. |
Thank you for your answer. I didn't know about BiDi until your comment. After spending some hours playing with BiDi, I have not managed to get the breakpoints to work. With the limited examples on https://www.selenium.dev/documentation/webdriver/bidirectional/ and SeleniumHQ/selenium#11244, this is what I came up with.
Could you guide me on what I should do? |
AFAIK the Python bindings do not yet support WebDriver BiDi. But you may want to check back with the Selenium folks. To play around with WebDriver BiDi you could use our Webconsole example project at https://firefox-dev.tools/bidi-webconsole-prototype/. Just start Firefox as mentioned and open the DevTools panel, connect to it and run |
I am using the selenium webdriver for Firefox for a project and I noticed that when I use execute_script, and I have a debugger statement in the JavaScript code that I pass through to it, the breakpoint is never 'activated', meaning the code never pauses at the debugger statement. This made me notice that the JS code is not available in the debugger/sources tab which I think is the source of the issue.
Note that I also tried this in chrome and it works as expected: The code pauses at the debugger statement (you need to have the terminal open) and then the JS code that you passed through execute_script is available in the debugger/sources tab.
It would be really useful to have the both the code available in the debugger sources tab and for the breakpoints to work. Another advantage of this is that we can see exactly where in the JS code an error is if one occurs. Please let me know if you'd like me to provide screenshots of how it works in Chrome.
System
Steps to reproduce:
Run the following code, the browser should pause at the breakpoint but you will notice that it doesn't.
The text was updated successfully, but these errors were encountered: