WebDriverForwarder class Null safety
The primary difference between this and the standard wire protocol is in the use of WebElement ids. When you need to refer to an element in a request (URI or JSON body), then you should add an 'wd-element-id' attribute to the corresponding element with a unique identifier, and use that identifier as the element id for that element. This class will then search for the corresponding element and in the document and will substitute an actual WebElement id for the given identifier in the request.
This forwarder supports two additional commands that control how it searches for elements: POST '/enabledeep': enables searching through all Shadow DOMs in the document for the corresponding element (but will fail on browsers that don't support the '/deep/' css selector combinator). POST '/disabledeep': disables searching in Shadow DOMs of the document.
This forwarder also supports two additional commands for grabbing the browser contents and saving it to the file system. POST '/screenshot': takes a 'file' arg and will capture a screenshot of the browser and save it to the specified file name in outputDir. POST '/source': takes a 'file' arg and will capture the current page's source and save it to the specified file name in outputDir.
See https://code.google.com/p/selenium/wiki/JsonWireProtocol for documentation of other commands.
- driver → WebDriver
WebDriver instance to forward commands to.
- hashCode → int
The hash code for this object. [...]
- outputDir → Directory
Directory to save screenshots and page source to.
- prefix → Pattern
Path prefix that all forwarded commands will have.
- runtimeType → Type
A representation of the runtime type of the object.
- useDeep ↔ bool
Search for elements in all shadow doms of the current document.
read / write
HttpRequest request ) → Future< void>
requestto driver and respond to the request with the returned value or any thrown exceptions.
Invocation invocation ) → dynamic
Invoked when a non-existent method or property is accessed. [...]
) → String
Returns a string representation of this object.