diff --git a/src/app.py b/src/app.py index 5a85de7..b21f622 100644 --- a/src/app.py +++ b/src/app.py @@ -108,6 +108,11 @@ def appium_run(avd_name: str): DEFAULT_LOG_PATH = '/var/log/supervisor/appium.log' cmd = 'appium --log {log}'.format(log=os.getenv('APPIUM_LOG', DEFAULT_LOG_PATH)) + relaxed_security = convert_str_to_bool(str(os.getenv('RELAXED_SECURITY', False))) + logger.info('Relaxed security? {rs}'.format(rs=relaxed_security)) + if relaxed_security: + cmd += ' --relaxed-security' + default_web_browser = os.getenv('BROWSER') if default_web_browser == 'chrome': cmd += ' --chromedriver-executable {driver}'.format(driver=CHROME_DRIVER) diff --git a/src/appium.sh b/src/appium.sh index daaa2cb..9a8bab3 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -35,12 +35,17 @@ function prepare_geny_cloud() { function run_appium() { echo "Preparing appium-server..." CMD="appium --log $APPIUM_LOG" - if [ ! -z "$CONNECT_TO_GRID" ]; then + if [ "$CONNECT_TO_GRID" = true ]; then NODE_CONFIG_JSON="/root/src/nodeconfig.json" /root/generate_config.sh $NODE_CONFIG_JSON CMD+=" --nodeconfig $NODE_CONFIG_JSON" fi - echo "Preparation is done" + + if [ "$RELAXED_SECURITY" = true ]; then + CMD+=" --relaxed-security" + fi + + echo "Preparation is done" $CMD }