OLD | NEW |
1 This file contains high-level info about how ChromeDriver works and how to | 1 This file contains high-level info about how ChromeDriver works and how to |
2 contribute. | 2 contribute. |
3 | 3 |
4 ChromeDriver is an implementation of the WebDriver standard, | 4 ChromeDriver is an implementation of the WebDriver standard, |
5 which allows users to automate testing of their website across browsers. | 5 which allows users to automate testing of their website across browsers. |
6 | 6 |
7 =====Getting started===== | 7 =====Getting started===== |
8 Build ChromeDriver by building the 'chromedriver2' target. This will create | 8 Build ChromeDriver by building the 'chromedriver2' target. This will create |
9 a shared library in the build folder named 'chromedriver2.dll' (win), | 9 a shared library in the build folder named 'chromedriver2.dll' (win), |
10 'chromedriver2.so' (mac), or 'libchromedriver2.so' (linux). | 10 'chromedriver2.so' (mac), or 'libchromedriver2.so' (linux). |
11 | 11 |
12 Once built, ChromeDriver can be used interactively with python. | 12 Once built, ChromeDriver can be used interactively with python. |
13 This can be easily done by running python in this directory (or including | 13 This can be easily done by running python in this directory (or including |
14 this directory in your PYTHONPATH). | 14 this directory in your PYTHONPATH). |
15 | 15 |
16 $ python | 16 $ python |
17 >>> import chromedriver | 17 >>> import chromedriver |
18 >>> driver = chromedriver.ChromeDriver('/path/to/chromedriver2/library') | 18 >>> driver = chromedriver.ChromeDriver('/path/to/chromedriver2/library') |
19 >>> driver.Load('http://www.google.com') | 19 >>> driver.Load('http://www.google.com') |
20 | 20 |
21 ChromeDriver will use the system installed Chrome by default. | 21 ChromeDriver will use the system installed Chrome by default. |
22 | 22 |
| 23 To use ChromeDriver2 with Chrome on Android pass the Android package name in the |
| 24 chromeOptions.androidPackage capability when creating the driver. The path to |
| 25 adb_commands.py and the adb tool from the Android SDK must be set in PATH. For |
| 26 more detailed instructions see the wiki: |
| 27 https://code.google.com/p/chromedriver/wiki/ChromeDriver2forAndroid |
| 28 |
23 =====Architecture===== | 29 =====Architecture===== |
24 ChromeDriver is shipped separately from Chrome. It controls Chrome out of | 30 ChromeDriver is shipped separately from Chrome. It controls Chrome out of |
25 process through DevTools (WebKit Inspector). ChromeDriver is a shared library | 31 process through DevTools (WebKit Inspector). ChromeDriver is a shared library |
26 which exports a few functions for executing WebDriver-standard commands, which | 32 which exports a few functions for executing WebDriver-standard commands, which |
27 are packaged in JSON. For internal use, a custom python client for ChromeDriver | 33 are packaged in JSON. For internal use, a custom python client for ChromeDriver |
28 is available in chromedriver.py, which works on desktop (win/mac/linux) with | 34 is available in chromedriver.py, which works on desktop (win/mac/linux) with |
29 the shared library ChromeDriver. | 35 the shared library ChromeDriver. |
30 | 36 |
31 The ChromeDriver shared library runs commands on the same thread that calls | 37 The ChromeDriver shared library runs commands on the same thread that calls |
32 ExecuteCommand. It doesn't create any additional threads except for the IO | 38 ExecuteCommand. It doesn't create any additional threads except for the IO |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 4) WebDriver Java acceptance tests | 87 4) WebDriver Java acceptance tests |
82 These are integration tests from the WebDriver open source project which can | 88 These are integration tests from the WebDriver open source project which can |
83 be run via run_java_tests.py. They are also run on the chromium QA bots. | 89 be run via run_java_tests.py. They are also run on the chromium QA bots. |
84 See http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/webdriver | 90 See http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/webdriver |
85 | 91 |
86 =====Contributing===== | 92 =====Contributing===== |
87 Find an open issue and submit a patch for review by an individual listed in | 93 Find an open issue and submit a patch for review by an individual listed in |
88 the OWNERS file in this directory. Issues are tracked in chromedriver's issue | 94 the OWNERS file in this directory. Issues are tracked in chromedriver's issue |
89 tracker: | 95 tracker: |
90 https://code.google.com/p/chromedriver/issues/list | 96 https://code.google.com/p/chromedriver/issues/list |
OLD | NEW |