aboutsummaryrefslogtreecommitdiff
path: root/selenium
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-12 15:06:53 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-12 15:06:53 +0200
commitdb79e76b625416615b51e01bcd75ce4d7a0db5ee (patch)
tree5a84a12c1b738799b9d93c9873f884747b7f4c9b /selenium
parentd9c77abed0997dba6483bdc3922f82686ca5fad0 (diff)
selenium: .crx passed in options
Diffstat (limited to 'selenium')
-rw-r--r--selenium/test.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/selenium/test.py b/selenium/test.py
index 587de893f..a3d4f5fe9 100644
--- a/selenium/test.py
+++ b/selenium/test.py
@@ -20,21 +20,20 @@ import os
import re
import json
-logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
+logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
taler_baseurl = os.environ.get('TALER_BASEURL', 'https://test.taler.net/')
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)
+ co.add_extension(args.ext)
cap = co.to_capabilities()
cap['loggingPrefs'] = {'driver': 'INFO', 'browser': 'INFO'}
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){
@@ -220,7 +219,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('--ext', help="packed extension (.crx file)", metavar="CRX", type=str, dest="ext", 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..")