mirror of
https://github.com/izzy2lost/docker-android.git
synced 2026-06-19 01:16:28 -07:00
Set default browser, mobile web test parameter and docker compose example
This commit is contained in:
+3
-1
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user