• Home
Name Date Size #Lines LOC

..--

chrome/03-May-2024-9,8377,686

client/03-May-2024-580472

extension/03-May-2024-10355

js/03-May-2024-1,5271,114

net/03-May-2024-2,7982,208

server/03-May-2024-1,4461,292

test/03-May-2024-3,1842,715

third_party/googlecode/03-May-2024-464331

DEPSD03-May-2024275 1410

OWNERSD03-May-202481 54

README.txtD03-May-20244 KiB10984

VERSIOND03-May-20245 21

alert_commands.ccD03-May-20243 KiB10385

alert_commands.hD03-May-20241.7 KiB6947

archive.pyD03-May-20242.9 KiB9875

basic_types.ccD03-May-20241,008 4121

basic_types.hD03-May-2024822 4430

capabilities.ccD03-May-202420.4 KiB589504

capabilities.hD03-May-20244 KiB14783

capabilities_unittest.ccD03-May-202420.2 KiB565493

chrome_launcher.ccD03-May-202430.4 KiB798696

chrome_launcher.hD03-May-20241.6 KiB5441

chrome_launcher_unittest.ccD03-May-20247.8 KiB200172

chrome_paths.pyD03-May-20241.2 KiB3824

command.hD03-May-2024714 3119

command_listener.hD03-May-2024711 2310

command_listener_proxy.ccD03-May-2024729 2012

command_listener_proxy.hD03-May-2024928 3116

command_listener_proxy_unittest.ccD03-May-20241.1 KiB4834

commands.ccD03-May-20249.3 KiB264222

commands.hD03-May-20241.9 KiB6746

commands_unittest.ccD03-May-202421.8 KiB731627

cpp_source.pyD03-May-20242.2 KiB7557

element_commands.ccD03-May-202416.5 KiB533482

element_commands.hD03-May-20245.7 KiB204153

element_util.ccD03-May-202420.7 KiB660602

element_util.hD03-May-20243.8 KiB151115

embed_extension_in_cpp.pyD03-May-20241.1 KiB4228

embed_js_in_cpp.pyD03-May-20241.5 KiB4631

embed_mobile_devices_in_cpp.pyD03-May-20241.4 KiB5035

embed_user_data_dir_in_cpp.pyD03-May-2024981 3622

embed_version_in_cpp.pyD03-May-20241.1 KiB4327

key_converter.ccD03-May-202411.8 KiB342286

key_converter.hD03-May-20241.4 KiB3518

key_converter_unittest.ccD03-May-202415.9 KiB413373

keycode_text_conversion.hD03-May-20241.5 KiB3614

keycode_text_conversion_mac.mmD03-May-20243.7 KiB113103

keycode_text_conversion_ozone.ccD03-May-2024923 2820

keycode_text_conversion_unittest.ccD03-May-20245.7 KiB167130

keycode_text_conversion_win.ccD03-May-20242.1 KiB6048

keycode_text_conversion_x.ccD03-May-20247.6 KiB270239

logging.ccD03-May-20249.4 KiB295239

logging.hD03-May-20242.8 KiB7844

logging_unittest.ccD03-May-20245.6 KiB168134

performance_logger.ccD03-May-202410.4 KiB297237

performance_logger.hD03-May-20243.7 KiB9449

performance_logger_unittest.ccD03-May-202412.8 KiB388321

run_buildbot_steps.pyD03-May-202418.8 KiB551433

session.ccD03-May-20243.4 KiB12297

session.hD03-May-20242.9 KiB9366

session_commands.ccD03-May-202421.2 KiB665574

session_commands.hD03-May-20244.9 KiB172125

session_commands_unittest.ccD03-May-20244.9 KiB158116

session_thread_map.hD03-May-2024517 178

session_unittest.ccD03-May-20243.1 KiB10376

test_util.ccD03-May-20242 KiB5949

test_util.hD03-May-20241.6 KiB5229

util.ccD03-May-202414 KiB442377

util.hD03-May-20241.7 KiB4923

util.pyD03-May-20244.8 KiB202146

util_unittest.ccD03-May-20241.9 KiB5139

window_commands.ccD03-May-202427.1 KiB887804

window_commands.hD03-May-20248.2 KiB300221

README.txt

1This file contains high-level info about how ChromeDriver works and how to
2contribute.
3
4ChromeDriver is an implementation of the WebDriver standard,
5which allows users to automate testing of their website across browsers.
6
7See the user site at https://sites.google.com/a/chromium.org/chromedriver/
8
9=====Getting started=====
10Build ChromeDriver by building the 'chromedriver' target. This will
11create an executable binary in the build folder named
12'chromedriver[.exe]'.
13
14Once built, ChromeDriver can be used interactively with python.
15
16$ export PYTHONPATH=<THIS_DIR>/server:<THIS_DIR>/client
17$ python
18>>> import server
19>>> import chromedriver
20>>> cd_server = server.Server('/path/to/chromedriver/executable')
21>>> driver = chromedriver.ChromeDriver(cd_server.GetUrl())
22>>> driver.Load('http://www.google.com')
23>>> driver.Quit()
24>>> cd_server.Kill()
25
26ChromeDriver will use the system installed Chrome by default.
27
28To use ChromeDriver2 with Chrome on Android pass the Android package name in the
29chromeOptions.androidPackage capability when creating the driver. The path to
30adb_commands.py and the adb tool from the Android SDK must be set in PATH. For
31more detailed instructions see the user site.
32
33=====Architecture=====
34ChromeDriver is shipped separately from Chrome. It controls Chrome out of
35process through DevTools. ChromeDriver is a standalone server which
36communicates with the WebDriver client via the WebDriver wire protocol, which
37is essentially synchronous JSON commands over HTTP. WebDriver clients are
38available in many languages, and many are available from the open source
39selenium/webdriver project: http://code.google.com/p/selenium. ChromeDriver
40uses the webserver from net/server.
41
42ChromeDriver has a main thread, called the command thread, an IO thread,
43and a thread per session. The webserver receives a request on the IO thread,
44which is sent to a handler on the command thread. The handler executes the
45appropriate command function, which completes asynchronously. The create
46session command may create a new thread for subsequent session-related commands,
47which will execute on the dedicated session thread synchronously. When a
48command is finished, it will invoke a callback, which will eventually make its
49way back to the IO thread as a HTTP response for the server to send.
50
51=====Code structure (relative to this file)=====
521) .
53Implements chromedriver commands.
54
552) chrome/
56A basic interface for controlling Chrome. Should not depend on or reference
57WebDriver-related code or concepts.
58
593) js/
60Javascript helper scripts.
61
624) net/
63Code to deal with network communication, such as connection to DevTools.
64
655) client/
66Code for a python client.
67
686) server/
69Code for the chromedriver server.
70A python wrapper to the chromedriver server.
71
727) extension/
73An extension used for automating the desktop browser.
74
758) test/
76Integration tests.
77
789) third_party/
79Third party libraries used by chromedriver.
80
81=====Testing=====
82See the ChromeDriver waterfall at:
83    http://build.chromium.org/p/chromium.chromedriver/waterfall
84There are 4 test suites for verifying ChromeDriver's correctness:
85
861) chromedriver_unittests (chrome/chrome_tests.gypi)
87This is the unittest target, which runs on the main waterfall on win/mac/linux
88and can close the tree. It is also run on the commit queue and try bots by
89default. Tests should take a few milliseconds and be very stable.
90
912) chromedriver_tests (chrome/chrome_tests.gypi)
92This is a collection of C++ medium sized tests which can be run optionally
93on the trybots.
94
953) python integration tests
96Run test/run_py_tests.py --help for more info. These are only run on the
97ChromeDriver waterfall.
98
994) WebDriver Java acceptance tests
100These are integration tests from the WebDriver open source project which can
101be run via test/run_java_tests.py. They are only run on the ChromeDriver
102bots. Run with --help for more info.
103
104=====Contributing=====
105Find an open issue and submit a patch for review by an individual listed in
106the OWNERS file in this directory. Issues are tracked in chromedriver's issue
107tracker:
108    https://code.google.com/p/chromedriver/issues/list
109