Skip to content

Commit

Permalink
update appium robot framework
Browse files Browse the repository at this point in the history
  • Loading branch information
turkucuberk committed Nov 23, 2023
1 parent 2cdf525 commit d3f4ff6
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 56 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ 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

test_Android1:
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: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

test_ios1:
robot --variable version:14 --variable platformName:ios --variable deviceName:"iPhone 12" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/IOS.robot
robot --variable version:15 --variable platformName:ios --variable deviceName:"iPhone.*" --variable isRealMobile:true --variable visual:true --variable network:true --variable console:true --variable devicelog:true Tests/IOS.robot

test_Web_ios:
robot --variable version:14 --variable platformName:ios --variable deviceName:"iPhone 12" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/AndroidIosWeb.robot
robot --variable version:15 --variable platformName:ios --variable deviceName:"iPhone.*" --variable isRealMobile:true --variable visual:true --variable network:true --variable console:true --variable devicelog:true Tests/AndroidIosWeb.robot

test_Web_Android:
robot --variable version:10 --variable platformName:android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/AndroidIosWeb.robot
robot --variable version:11 --variable platformName:android --variable deviceName:"Galaxy.*" --variable isRealMobile:true --variable visual:true --variable network:true --variable console:true --variable devicelog:true Tests/AndroidIosWeb.robot
43 changes: 25 additions & 18 deletions Resources/AndroidCommon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,36 @@ Library AppiumLibrary

*** Variables ***

@{_tmp}
... platformName: ${platformName}
... platformVersion: ${version}
... deviceName: ${deviceName}
... visual: ${visual}
... network: ${network}
... isRealMobile: ${isRealMobile}
... name: 'RobotFramework Lambda Test'
... app: 'lt://proverbial-android'

#${BROWSER} ${ROBOT_BROWSER}
${CAPABILITIES} ${EMPTY.join(${_tmp})}
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
#${app} lt://APP100201841649255527998398
${app} lt://proverbial-android
${TIMEOUT} 3000
${platformName} ${platformName}
${platformName} android
#${platformVersion} 12 # Set your default version
${deviceName} Galaxy.*
${visual} True
${network} True
${isRealMobile} True
${LT_APP_ID} ''
${LT_GRID_URL} ''
${TIMEOUT} 3000

*** Keywords ***

Open test app
[Timeout] ${TIMEOUT}
Open Application ${REMOTE_URL} platformName=android platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} isRealMobile=${isRealMobile} app=${app} name="RobotFramework Lambda Test"
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
... devicelog=${devicelog}
... isRealMobile=${isRealMobile}
... 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}
${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

Close test app
Close All Applications
42 changes: 25 additions & 17 deletions Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,37 @@ Library AppiumLibrary

*** Variables ***

@{_tmp}
... platformName: ${platformName}
... platformVersion: ${version}
... deviceName: ${deviceName}
... visual: ${visual}
... network: ${network}
... isRealMobile: ${isRealMobile}
... name: 'RobotFramework Lambda Test'
... app: 'lt://proverbial-ios'
${platformName} ios
#${platformVersion} 15 # Set your default version
${deviceName} iPhone.*
${visual} True
${network} True
${isRealMobile} True
${LT_APP_ID} ''
${LT_GRID_URL} ''
${TIMEOUT} 3000

#${BROWSER} ${ROBOT_BROWSER}
${CAPABILITIES} ${EMPTY.join(${_tmp})}
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
#${app} lt://APP100201841649255527998398
${app} lt://proverbial-ios
${TIMEOUT} 3000
${platformName} ${platformName}

*** Keywords ***

Open test app
[Timeout] ${TIMEOUT}
Open Application ${REMOTE_URL} platformName=${platformName} platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} isRealMobile=${isRealMobile} app=${app} name="RobotFramework Lambda Test"
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
... devicelog=${devicelog}
... isRealMobile=${isRealMobile}
... 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}
${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

Close test app
Close All Applications
42 changes: 25 additions & 17 deletions Resources/CommonWeb.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,37 @@ Library AppiumLibrary

*** Variables ***

@{_tmp}
... platformName: ${platformName}
... platformVersion: ${version}
... deviceName: ${deviceName}
... visual: ${visual}
... network: ${network}
... isRealMobile: ${isRealMobile}
... name: 'RobotFramework Lambda Test'
... app: 'lt://proverbial-android'
${platformName} android
#${platformVersion} 12 # Set your default version
${deviceName} Galaxy.*
${visual} True
${devicelog} True
${network} True
${console} True
${isRealMobile} True
${LT_GRID_URL} ''
${TIMEOUT} 3000

#${BROWSER} ${ROBOT_BROWSER}
${CAPABILITIES} ${EMPTY.join(${_tmp})}
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
#${app} lt://APP100201841649255527998398
${app} lt://proverbial-android
${TIMEOUT} 3000
${platformName} ${platformName}

*** Keywords ***

Open test app
[Timeout] ${TIMEOUT}
Open Application ${REMOTE_URL} platformName=android platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} isRealMobile=${isRealMobile} name="RobotFramework Lambda Test"
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
... console=${console}
... devicelog=${devicelog}
... 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}
${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

Close test app
Close All Applications

0 comments on commit d3f4ff6

Please sign in to comment.