commit | e651776b75b828c0708f3bc8d26a9605e61e11d8 | [log] [tgz] |
---|---|---|
author | Marc Fisher <fisherii@google.com> | Wed Jan 11 11:54:57 2017 -0800 |
committer | staats-google <staats@google.com> | Wed Jan 11 20:54:57 2017 +0100 |
tree | 951150aa2d3e5b2185d3be867042dc6ddef3c5a8 | |
parent | 00bf9f118cf8415ceaf0bc20641055b20c9e48d5 [diff] |
Split tests up into separate targets. (#133) - Use codegen to select between io and html test configs. - Implement io test config. - Mark test flaky.
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) or with pub.
To run the tests with bazel:
bazel test ...
To run the tests with pub, you will need to first download chromedriver and start it:
chromedriver
Then in another terminal you can run:
pub install WEB_TEST_WEBDRIVER_SERVER=http://localhost:9515/ pub run test:test