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 See the user site at http://code.google.com/p/chromedriver. | 7 See the user site at https://sites.google.com/a/chromium.org/chromedriver/ |
8 | 8 |
9 =====Getting started===== | 9 =====Getting started===== |
10 Build ChromeDriver by building the 'chromedriver2_server' target. This will | 10 Build ChromeDriver by building the 'chromedriver' target. This will |
11 create an executable binary in the build folder named | 11 create an executable binary in the build folder named |
12 'chromedriver2_server[.exe]'. | 12 'chromedriver[.exe]'. |
13 | 13 |
14 Once built, ChromeDriver can be used interactively with python. | 14 Once built, ChromeDriver can be used interactively with python. |
15 | 15 |
16 $ export PYTHONPATH=<THIS_DIR>/server:<THIS_DIR>/client | 16 $ export PYTHONPATH=<THIS_DIR>/server:<THIS_DIR>/client |
17 $ python | 17 $ python |
18 >>> import server | 18 >>> import server |
19 >>> import chromedriver | 19 >>> import chromedriver |
20 >>> cd_server = server.Server('/path/to/chromedriver2_server/executable') | 20 >>> cd_server = server.Server('/path/to/chromedriver/executable') |
21 >>> driver = chromedriver.ChromeDriver(cd_server.GetUrl()) | 21 >>> driver = chromedriver.ChromeDriver(cd_server.GetUrl()) |
22 >>> driver.Load('http://www.google.com') | 22 >>> driver.Load('http://www.google.com') |
23 >>> driver.Quit() | 23 >>> driver.Quit() |
24 >>> cd_server.Kill() | 24 >>> cd_server.Kill() |
25 | 25 |
26 ChromeDriver will use the system installed Chrome by default. | 26 ChromeDriver will use the system installed Chrome by default. |
27 | 27 |
28 To use ChromeDriver2 with Chrome on Android pass the Android package name in the | 28 To use ChromeDriver2 with Chrome on Android pass the Android package name in the |
29 chromeOptions.androidPackage capability when creating the driver. The path to | 29 chromeOptions.androidPackage capability when creating the driver. The path to |
30 adb_commands.py and the adb tool from the Android SDK must be set in PATH. For | 30 adb_commands.py and the adb tool from the Android SDK must be set in PATH. For |
31 more detailed instructions see the wiki: | 31 more detailed instructions see the user site. |
32 https://code.google.com/p/chromedriver/wiki/ChromeDriver2forAndroid | |
33 | 32 |
34 =====Architecture===== | 33 =====Architecture===== |
35 ChromeDriver is shipped separately from Chrome. It controls Chrome out of | 34 ChromeDriver is shipped separately from Chrome. It controls Chrome out of |
36 process through DevTools. ChromeDriver is a standalone server which | 35 process through DevTools. ChromeDriver is a standalone server which |
37 communicates with the WebDriver client via the WebDriver wire protocol, which | 36 communicates with the WebDriver client via the WebDriver wire protocol, which |
38 is essentially synchronous JSON commands over HTTP. WebDriver clients are | 37 is essentially synchronous JSON commands over HTTP. WebDriver clients are |
39 available in many languages, and many are available from the open source | 38 available in many languages, and many are available from the open source |
40 selenium/webdriver project: http://code.google.com/p/selenium. ChromeDriver | 39 selenium/webdriver project: http://code.google.com/p/selenium. ChromeDriver |
41 uses the webserver from net/server. | 40 uses the webserver from net/server. |
42 | 41 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 Integration tests. | 76 Integration tests. |
78 | 77 |
79 9) third_party/ | 78 9) third_party/ |
80 Third party libraries used by chromedriver. | 79 Third party libraries used by chromedriver. |
81 | 80 |
82 =====Testing===== | 81 =====Testing===== |
83 See the ChromeDriver waterfall at: | 82 See the ChromeDriver waterfall at: |
84 http://build.chromium.org/p/chromium.chromedriver/waterfall | 83 http://build.chromium.org/p/chromium.chromedriver/waterfall |
85 There are 4 test suites for verifying ChromeDriver's correctness: | 84 There are 4 test suites for verifying ChromeDriver's correctness: |
86 | 85 |
87 1) chromedriver2_unittests (chrome/chrome_tests.gypi) | 86 1) chromedriver_unittests (chrome/chrome_tests.gypi) |
88 This is the unittest target, which runs on the main waterfall on win/mac/linux | 87 This is the unittest target, which runs on the main waterfall on win/mac/linux |
89 and can close the tree. It is also run on the commit queue and try bots by | 88 and can close the tree. It is also run on the commit queue and try bots by |
90 default. Tests should take a few milliseconds and be very stable. | 89 default. Tests should take a few milliseconds and be very stable. |
91 | 90 |
92 2) chromedriver2_tests (chrome/chrome_tests.gypi) | 91 2) chromedriver_tests (chrome/chrome_tests.gypi) |
93 This is a collection of C++ medium sized tests which can be run optionally | 92 This is a collection of C++ medium sized tests which can be run optionally |
94 on the trybots. | 93 on the trybots. |
95 | 94 |
96 3) python integration tests | 95 3) python integration tests |
97 Run test/run_py_tests.py --help for more info. These are only run on the | 96 Run test/run_py_tests.py --help for more info. These are only run on the |
98 ChromeDriver waterfall. | 97 ChromeDriver waterfall. |
99 | 98 |
100 4) WebDriver Java acceptance tests | 99 4) WebDriver Java acceptance tests |
101 These are integration tests from the WebDriver open source project which can | 100 These are integration tests from the WebDriver open source project which can |
102 be run via test/run_java_tests.py. They are only run on the ChromeDriver | 101 be run via test/run_java_tests.py. They are only run on the ChromeDriver |
103 bots. Run with --help for more info. | 102 bots. Run with --help for more info. |
104 | 103 |
105 =====Contributing===== | 104 =====Contributing===== |
106 Find an open issue and submit a patch for review by an individual listed in | 105 Find an open issue and submit a patch for review by an individual listed in |
107 the OWNERS file in this directory. Issues are tracked in chromedriver's issue | 106 the OWNERS file in this directory. Issues are tracked in chromedriver's issue |
108 tracker: | 107 tracker: |
109 https://code.google.com/p/chromedriver/issues/list | 108 https://code.google.com/p/chromedriver/issues/list |
OLD | NEW |