From a204eeef8e608a1502c0c3c84cc9f6da0e6abea8 Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Thu, 19 Dec 2019 15:29:08 +0300 Subject: [PATCH] Check whether selenium was installed --- images/linux/scripts/installers/google-chrome.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/google-chrome.sh b/images/linux/scripts/installers/google-chrome.sh index ea5db116e..685b53624 100644 --- a/images/linux/scripts/installers/google-chrome.sh +++ b/images/linux/scripts/installers/google-chrome.sh @@ -58,6 +58,14 @@ SELENIUM_VERSION_MAJOR_MINOR=$(echo $SELENIUM_VERSION | cut -d '.' -f 1,2) # Download selenium standalone server (hardcoded version 3.141.59) echo "Downloading selenium-server-standalone v$SELENIUM_VERSION..." -wget https://selenium-release.storage.googleapis.com/$SELENIUM_VERSION_MAJOR_MINOR/selenium-server-standalone-$SELENIUM_VERSION.jar +SELENIUM_JAR_NAME=selenium-server-standalone-$SELENIUM_VERSION.jar +wget https://selenium-release.storage.googleapis.com/$SELENIUM_VERSION_MAJOR_MINOR/$SELENIUM_JAR_NAME + +echo "Testing to make sure that script performed as expected, and basic scenarios work" +if [ ! -f "$SELENIUM_JAR_NAME" ]; then + echo "Selenium server was not installed" + exit 1 +fi + mv selenium-server-standalone-$SELENIUM_VERSION.jar /usr/share/java/selenium-server-standalone.jar echo "CLASSPATH=/usr/share/java/selenium-server-standalone.jar:." | tee -a /etc/environment \ No newline at end of file