This commit is contained in:
butomo1989
2019-01-15 10:19:42 +01:00
parent 32cb68f6c9
commit cf0ebd7eb9
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ def appium_run(avd_name: str):
grid_connect = convert_str_to_bool(str(os.getenv('CONNECT_TO_GRID', False)))
logger.info('Connect to selenium grid? {connect}'.format(connect=grid_connect))
if grid_connect:
local_ip = os.popen('ifconfig eth0 | grep \'inet addr:\' | cut -d: -f2 | awk \'{ print $1}\'').read().strip()
# Ubuntu 16.04 -> local_ip = os.popen('ifconfig eth0 | grep \'inet addr:\' | cut -d: -f2 | awk \'{ print $1}\'').read().strip()
local_ip = os.popen('ifconfig eth0 | grep \'inet\' | cut -d: -f2 | awk \'{ print $2}\'').read().strip()
try:
mobile_web_test = convert_str_to_bool(str(os.getenv('MOBILE_WEB_TEST', False)))
appium_host = os.getenv('APPIUM_HOST', local_ip)