Set default browser, mobile web test parameter and docker compose example

This commit is contained in:
Andrejs Cunskis
2017-05-24 15:50:34 +03:00
parent 333c2b2a90
commit 5501a20426
9 changed files with 71 additions and 7 deletions
+3 -1
View File
@@ -106,11 +106,13 @@ def appium_run(avd_name: str):
logger.info('Connect to selenium grid? {connect}'.format(connect=grid_connect))
if grid_connect:
try:
mobile_web_test = str_to_bool(str(os.getenv('MOBILE_WEB_TEST', False)))
default_web_browser = os.getenv('BROWSER')
appium_host = os.getenv('APPIUM_HOST', local_ip)
appium_port = int(os.getenv('APPIUM_PORT', 4723))
selenium_host = os.getenv('SELENIUM_HOST', '172.17.0.1')
selenium_port = int(os.getenv('SELENIUM_PORT', 4444))
browser_name = os.getenv('BROWSER', 'Chrome')
browser_name = default_web_browser if mobile_web_test else 'android'
create_node_config(avd_name, browser_name, appium_host, appium_port, selenium_host, selenium_port)
cmd += ' --nodeconfig {file}'.format(file=CONFIG_FILE)
except ValueError as v_err:
+1 -1
View File
@@ -44,7 +44,7 @@ class TestAppium(TestCase):
def test_config_creation(self):
from src import CONFIG_FILE
self.assertFalse(os.path.exists(CONFIG_FILE))
app.create_node_config('test', 'Chrome', '127.0.0.1', 4723, '127.0.0.1', 4444)
app.create_node_config('test', 'android', '127.0.0.1', 4723, '127.0.0.1', 4444)
self.assertTrue(os.path.exists(CONFIG_FILE))
os.remove(CONFIG_FILE)