Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3317)

Unified Diff: chrome/test/chromedriver/chromedriver.py

Issue 11414267: Fix finding chrome binary for ChromeDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/chromedriver/run_all_tests.py » ('j') | chrome/test/chromedriver/run_all_tests.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chromedriver.py
diff --git a/chrome/test/chromedriver/chromedriver.py b/chrome/test/chromedriver/chromedriver.py
index 06afea6f243f0a2ba1281771c353f9189aed57ba..cbe6d3b0537f5c36fca16641bc796969af3696cf 100644
--- a/chrome/test/chromedriver/chromedriver.py
+++ b/chrome/test/chromedriver/chromedriver.py
@@ -30,9 +30,19 @@ def _ExceptionForResponse(response):
class ChromeDriver(object):
"""Starts and controls a single Chrome instance on this machine."""
- def __init__(self, lib_path):
+ def __init__(self, lib_path, chrome_binary=None):
self._lib = ctypes.CDLL(lib_path)
- self._session_id = self._ExecuteCommand('newSession')
+ if chrome_binary is None:
+ params = {}
+ else:
+ params = {
+ 'desiredCapabilities': {
+ 'chrome': {
+ 'binary': chrome_binary
+ }
+ }
+ }
+ self._session_id = self._ExecuteCommand('newSession', params)
def _ExecuteCommand(self, name, params={}, session_id=''):
cmd = {
« no previous file with comments | « no previous file | chrome/test/chromedriver/run_all_tests.py » ('j') | chrome/test/chromedriver/run_all_tests.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698