commit | 805dd23f6853060d5214e600462bd364818be1c7 | [log] [tgz] |
---|---|---|
author | staats-google <staats@google.com> | Mon Jun 12 09:59:31 2017 +0200 |
committer | GitHub <noreply@github.com> | Mon Jun 12 09:59:31 2017 +0200 |
tree | 62acc43c4cbaf5685d5ac5993be1583372e004ea | |
parent | e9fce64b6c18204933ef2dbc839354163b0af52a [diff] |
Refactor sync WebDriver in preparation of supporting the JSON wire and W3C specs simultaneously. (#151) * Migrates alert and keyboard to json_wire_spec. * Fix keyboard import to be relative. * Moves logs and mouse to json_wire_spec. * Refactors cookies, navigation, and timeouts into json_wire_spec. * Removes size from web_element. This is the only difference between the JSON and W3C spec and it does not appear to be used. * Revert removal of size. This is needed for realistic use of mouse in JSON wire spec. * Refactors web element as JSON wire spec. * Initial stab at refactoring window to json_wire_spec. * Finished migration of targetlocator and window to json_wire_spec. * Ran dartfmt over codebase. * Refactored WebDriver to json_wire_spec. * Tidied up imports. * Small comment, type updates. * Move from var to final wherever possible for sync WebDriver. * Updated copyright dates and prefer final over var.
Provides WebDriver bindings for Dart. These use the WebDriver JSON interface, and as such, require the use of the WebDriver remote server.
Depend on it
Add this to your package's pubspec.yaml file:
dependencies: webdriver: any
If your package is an application package you should use any as the version constraint.
Install it
If you're using the Dart Editor, choose:
Menu > Tools > Pub Install
Or if you want to install from the command line, run:
$ pub install
Import it
Now in your Dart code, you can use:
import 'package:webdriver/io.dart'; WebDriver driver = createDriver(...);
You can run the tests either with bazel (only supported on Linux).
bazel test ...