diff options
author | Jeff Burdges <burdges@gnunet.org> | 2016-05-12 14:06:44 +0200 |
---|---|---|
committer | Jeff Burdges <burdges@gnunet.org> | 2016-05-12 14:06:44 +0200 |
commit | d9c77abed0997dba6483bdc3922f82686ca5fad0 (patch) | |
tree | 51f2779d02afae11ce2ef84f131305f00272d631 | |
parent | 75d798aacde7bdeca56a58617e7b87b25461bb34 (diff) | |
parent | f0c3542f8d84e78d8e5f57be5cc899e4fc80726b (diff) | |
download | wallet-core-d9c77abed0997dba6483bdc3922f82686ca5fad0.tar.xz |
Merge branch 'master' of git.taler.net:/var/git/wallet-webex
-rw-r--r-- | selenium/test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/selenium/test.py b/selenium/test.py index 7de65d294..587de893f 100644 --- a/selenium/test.py +++ b/selenium/test.py @@ -18,6 +18,7 @@ import logging import sys import os import re +import json logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) logger = logging.getLogger(__name__) @@ -27,9 +28,13 @@ def client_setup(args): """Return a dict containing the driver and the extension's id""" co = webdriver.ChromeOptions() co.add_argument("load-extension=" + args.extdir) - cap = webdriver.DesiredCapabilities.CHROME.copy() + cap = co.to_capabilities() cap['loggingPrefs'] = {'driver': 'INFO', 'browser': 'INFO'} - client = webdriver.Chrome(chrome_options=co, desired_capabilities=cap) + if args.remote: + client = webdriver.Remote(desired_capabilities=cap, command_executor=args.remote) + else: + client = webdriver.Chrome(desired_capabilities=cap) + # client = webdriver.Chrome(chrome_options=co, desired_capabilities=cap) client.get('https://taler.net') listener = """\ document.addEventListener('taler-id', function(evt){ @@ -216,6 +221,7 @@ def withdraw(client, amount_value=None): parser = argparse.ArgumentParser() parser.add_argument('--extdir', help="Folder containing the unpacked extension", metavar="EXTDIR", type=str, dest="extdir", required=True) +parser.add_argument('--remote', help="Whether the test is to be run against URI, or locally", metavar="URI", type=str, dest="remote") args = parser.parse_args() logger.info("Getting extension's ID..") ret = client_setup(args) |