-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
B-devtoolsIncludes everything BiDi or Chrome DevTools relatedIncludes everything BiDi or Chrome DevTools relatedC-dotnet.NET Bindings.NET BindingsC-pyPython BindingsPython BindingsC-rbRuby BindingsRuby BindingsI-enhancementSomething could be betterSomething could be better
Milestone
Description
Feature and motivation
At the Selenium Dev Summit we agreed on this API to be generally applied across the bindings; we'll keep this labeled beta while we make sure that it works for what is needed
We want the methods to be accessible from a script() method available directly from the Driver class (e.g., driver.script.pin(script), driver.Script().Pin(script)). We can't do everything just like this in all the languages, because, for example, .NET uses events with a += and -= for adding and removing handler events so we don't went "add" and "remove" methods.
Implementations:
| Method | Java | NodeJS | Python | Ruby | .NET |
|---|---|---|---|---|---|
pin() |
β
|
β
|
β
|
||
unpin() |
β
|
β
|
β
|
||
execute() |
β
|
β
|
β
|
||
addConsoleMessageHandler() |
β
|
β
|
β
|
β
|
#14057 |
removeConsoleMessageHandler() |
β
|
β
|
β
|
β
|
#14057 |
addDomMutationHandler() |
β
|
β
|
|||
removeDomMutationHandler() |
β
|
β
|
|||
addJavaScriptErrorHandler() |
β
|
β
|
β
|
β
|
#14057 |
removeJavaScriptErrorHandler() |
β
|
β
|
β
|
β
|
#14057 |
Considerations
- some of these "script" methods are in the "log" domain in BiDi spec, but "log" is overloaded and we were concerned that it would not be obvious what
driver.log()was supposed to give access to. As such we agreed it would work well in theScriptimplementation - we agreed to split out console messages from javaScript errors even though both come through the same BiDi method
- we agreed not to have an async version of execute method in the BiDi API
Metadata
Metadata
Assignees
Labels
B-devtoolsIncludes everything BiDi or Chrome DevTools relatedIncludes everything BiDi or Chrome DevTools relatedC-dotnet.NET Bindings.NET BindingsC-pyPython BindingsPython BindingsC-rbRuby BindingsRuby BindingsI-enhancementSomething could be betterSomething could be better