Skip to content

Commit

Permalink
Added support for calling Dynamic App_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
turkucuberk committed Nov 24, 2023
1 parent d3f4ff6 commit 6f7e8ee
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ run_all_in_parallel:
make -j test_GalaxyS20Plus #test_GalaxyS10

test_GalaxyS20Plus:
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/Android.robot
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:true --variable devicelog:true Tests/Android.robot

test_GalaxyS10:
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S10" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/Android.robot
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S10" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:true --variable devicelog:true Tests/Android.robot

test_Android1:
robot --variable version:12 --variable platformName:android --variable deviceName:"Galaxy.*" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:true --variable devicelog:true Tests/Android.robot
Expand Down
12 changes: 10 additions & 2 deletions Resources/AndroidCommon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ Open test app
... name=LT_Appium_Robot_App_Android
... build=LT_Appium_Robot_App_Automation
... app=${LT_APP_ID}
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
${APP_ID}= Set Variable If '%{LT_APP_ID}' == '' lt://proverbial-android %{LT_APP_ID}
TRY
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
EXCEPT
${REMOTE_URL}= Set Variable mobile-hub.lambdatest.com
END
TRY
${APP_ID}= Set Variable If '%{LT_APP_ID}' == '' lt://proverbial-android %{LT_APP_ID}
EXCEPT
${APP_ID}= Set Variable lt://proverbial-android
END
${REMOTE_URL}= Set Variable https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@${REMOTE_URL}/wd/hub

Open Application ${REMOTE_URL} platformName=android platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} devicelog=${devicelog} isRealMobile=${isRealMobile} app=${APP_ID} name=LT_Appium_Robot_App_Android build=LT_Appium_Robot_App_Automation
Expand Down
12 changes: 10 additions & 2 deletions Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ Open test app
... name=LT_Appium_Robot_App_iOS
... build=LT_Appium_Robot_App_Automation
... app=${LT_APP_ID}
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
${APP_ID}= Set Variable If '%{LT_APP_ID}' == '' lt://proverbial-ios %{LT_APP_ID}
TRY
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
EXCEPT
${REMOTE_URL}= Set Variable mobile-hub.lambdatest.com
END
TRY
${APP_ID}= Set Variable If '%{LT_APP_ID}' == '' lt://proverbial-ios %{LT_APP_ID}
EXCEPT
${APP_ID}= Set Variable lt://proverbial-ios
END
${REMOTE_URL}= Set Variable https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@${REMOTE_URL}/wd/hub

Open Application ${REMOTE_URL} platformName=ios platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} devicelog=${devicelog} isRealMobile=${isRealMobile} app=${APP_ID} name=LT_Appium_Robot_App_iOS build=LT_Appium_Robot_App_Automation
Expand Down
6 changes: 5 additions & 1 deletion Resources/CommonWeb.robot
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ Open test app
... isRealMobile=${isRealMobile}
... name=LT_Appium_Robot_App_Android
... build=LT_Appium_Robot_App_Automation
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
TRY
${REMOTE_URL}= Set Variable If '%{LT_GRID_URL}' == '' mobile-hub.lambdatest.com %{LT_GRID_URL}
EXCEPT
${REMOTE_URL}= Set Variable mobile-hub.lambdatest.com
END
${REMOTE_URL}= Set Variable https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@${REMOTE_URL}/wd/hub

Open Application ${REMOTE_URL} platformName=${platformName} platformVersion=${version} deviceName=${deviceName} visual=${visual} console=${console} network=${network} devicelog=${devicelog} isRealMobile=${isRealMobile} name=LT_Appium_Robot_Web build=LT_Appium_Robot_Web_Automation
Expand Down

0 comments on commit 6f7e8ee

Please sign in to comment.