Skip to content

Commit

Permalink
Merge pull request #11 from turkucuberk/update
Browse files Browse the repository at this point in the history
update appium robot framework
  • Loading branch information
sururocks authored Nov 24, 2023
2 parents 2cdf525 + 46ea661 commit d3d1076
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 58 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ 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: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
51 changes: 33 additions & 18 deletions Resources/AndroidCommon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,44 @@ 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}
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

Close test app
Close All Applications
50 changes: 33 additions & 17 deletions Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,45 @@ 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}
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

Close test app
Close All Applications
46 changes: 29 additions & 17 deletions Resources/CommonWeb.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ 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} 11 # 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
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

Close test app
Close All Applications

0 comments on commit d3d1076

Please sign in to comment.