summaryrefslogtreecommitdiff
path: root/docker/selenium/launch_selenium_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/selenium/launch_selenium_test.sh')
-rwxr-xr-xdocker/selenium/launch_selenium_test.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/selenium/launch_selenium_test.sh b/docker/selenium/launch_selenium_test.sh
new file mode 100755
index 0000000..7e87069
--- /dev/null
+++ b/docker/selenium/launch_selenium_test.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Takes only the docker-machine's IP address, assuming that the
+# chrome-docker service runs on port 4444
+
+# FIXME use getopt
+TEMP=`getopt -o r: --long docker-ip: -n 'launch_selenium_test.sh' -- "$@"`
+eval set -- "$TEMP"
+
+if test $1 != '--docker-ip'
+ then
+ echo '--docker-ip argument is mandatory, exiting..'
+ exit 1
+fi
+
+IP=$2
+
+# update wallet
+(cd $HOME/wallet-webex && git pull && tsc)
+
+# build crx file
+$HOME/deployment/docker/selenium/crxmake.sh $HOME/wallet-webex private.pem
+
+# call python3 selenium script
+python3 $HOME/wallet-webex/selenium/test.py --ext $HOME/wallet-webex.crx --remote http://$IP:4444/wd/hub