summaryrefslogtreecommitdiff
path: root/selenium
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-11-13 22:13:14 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-11-13 22:13:14 +0100
commitf4ba23448cbe09474d4b1fb4110562ea6b95995c (patch)
tree89f073d2871d340c5e4239398542296cb053b47c /selenium
parent98678dc31ab31e814506d500848786cd2ce6db1c (diff)
downloaddeployment-f4ba23448cbe09474d4b1fb4110562ea6b95995c.tar.gz
deployment-f4ba23448cbe09474d4b1fb4110562ea6b95995c.tar.bz2
deployment-f4ba23448cbe09474d4b1fb4110562ea6b95995c.zip
moving selenium topdir
Diffstat (limited to 'selenium')
-rwxr-xr-xselenium/launch_chrome_container4
-rwxr-xr-xselenium/launch_selenium_test23
2 files changed, 27 insertions, 0 deletions
diff --git a/selenium/launch_chrome_container b/selenium/launch_chrome_container
new file mode 100755
index 0000000..42935f2
--- /dev/null
+++ b/selenium/launch_chrome_container
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+# If container runs out of heap space, add '-e JAVA_OPTS=-Xmx2g'
+docker run --name container_chrome -d -p 4444:4444 selenium/standalone-chrome-debug
diff --git a/selenium/launch_selenium_test b/selenium/launch_selenium_test
new file mode 100755
index 0000000..750505e
--- /dev/null
+++ b/selenium/launch_selenium_test
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# update wallet and pack extension
+(cd $HOME/wallet-webex \
+ && git pull \
+ && ./configure \
+ && make \
+ && xvfb-run chromium --pack-extension $HOME/wallet-webex)
+
+eval $(docker-machine env)
+
+# Get fresh image
+if docker restart container_chrome > /dev/null;
+then echo "Chrome container succesfully restarted";
+fi
+
+# Give time to container to get fully operational
+sleep 2
+
+# call python3 selenium script
+python3 $HOME/wallet-webex/selenium/withdraw_buy.py \
+ --ext=$HOME/ext.crx \
+ --remote=http://$(docker-machine ip):4444/wd/hub