Home | History | Annotate | only in /external/chromium_org/chrome/test/chromedriver
Up to higher level directory
NameDateSize
alert_commands.cc03-Dec-20143K
alert_commands.h03-Dec-20141.7K
archive.py03-Dec-20142.8K
basic_types.cc03-Dec-20141,008
basic_types.h03-Dec-2014822
capabilities.cc03-Dec-201417.1K
capabilities.h03-Dec-20143.3K
capabilities_unittest.cc03-Dec-201415.3K
chrome/03-Dec-2014
chrome_launcher.cc03-Dec-201427.3K
chrome_launcher.h03-Dec-20141.6K
chrome_launcher_unittest.cc03-Dec-20147.8K
chrome_paths.py03-Dec-20141.2K
client/03-Dec-2014
command.h03-Dec-2014714
commands.cc03-Dec-20148.7K
commands.h03-Dec-20141.9K
commands_unittest.cc03-Dec-201416.9K
cpp_source.py03-Dec-20142.2K
DEPS03-Dec-2014275
element_commands.cc03-Dec-201416.5K
element_commands.h03-Dec-20145.7K
element_util.cc03-Dec-201420.6K
element_util.h03-Dec-20143.8K
embed_extension_in_cpp.py03-Dec-20141.1K
embed_js_in_cpp.py03-Dec-20141.5K
embed_mobile_devices_in_cpp.py03-Dec-20141.4K
embed_user_data_dir_in_cpp.py03-Dec-2014981
embed_version_in_cpp.py03-Dec-20141.1K
extension/03-Dec-2014
js/03-Dec-2014
key_converter.cc03-Dec-201411.8K
key_converter.h03-Dec-20141.4K
key_converter_unittest.cc03-Dec-201415.9K
keycode_text_conversion.h03-Dec-20141.5K
keycode_text_conversion_mac.mm03-Dec-20143.7K
keycode_text_conversion_ozone.cc03-Dec-2014923
keycode_text_conversion_unittest.cc03-Dec-20145.7K
keycode_text_conversion_win.cc03-Dec-20142.1K
keycode_text_conversion_x.cc03-Dec-20147.6K
logging.cc03-Dec-20148.4K
logging.h03-Dec-20142.6K
logging_unittest.cc03-Dec-20144.9K
net/03-Dec-2014
OWNERS03-Dec-201460
README.txt03-Dec-20144K
run_buildbot_steps.py03-Dec-201416.7K
server/03-Dec-2014
session.cc03-Dec-20143.5K
session.h03-Dec-20142.5K
session_commands.cc03-Dec-201420.8K
session_commands.h03-Dec-20144.9K
session_commands_unittest.cc03-Dec-20144.9K
session_thread_map.h03-Dec-2014517
session_unittest.cc03-Dec-20143.1K
test/03-Dec-2014
test_util.cc03-Dec-20142K
test_util.h03-Dec-20141.6K
third_party/03-Dec-2014
util.cc03-Dec-201412.4K
util.h03-Dec-20141.4K
util.py03-Dec-20144.8K
util_unittest.cc03-Dec-20141.9K
VERSION03-Dec-20145
window_commands.cc03-Dec-201427.1K
window_commands.h03-Dec-20148.2K

README.txt

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