Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions Resources/AndroidCommon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ Library AppiumLibrary

*** Variables ***

#${username} username
#${accesskey} accesskey
${LT_GRID_URL} https://${username}:${accesskey}@mobile-hub.lambdatest.com/wd/hub
${platformName} android
${platformVersion} 12 # Set your default version
${deviceName} Galaxy.*
${visual} True
${network} True
${isRealMobile} True
${LT_APP_ID} ''
${LT_GRID_URL} ''
#${LT_APP_ID} 'APPID'
${TIMEOUT} 3000
${devicelog} True

*** Keywords ***

Open test app
[Timeout] ${TIMEOUT}
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... platformVersion=${platformVersion}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
Expand All @@ -33,14 +36,19 @@ Open test app
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
# TRY
# ${APP_ID}= Set Variable If '%{LT_APP_ID}' == '' lt://proverbial-android %{LT_APP_ID}
# EXCEPT
# ${APP_ID}= Set Variable lt://proverbial-android
# END
${APP_ID}= Set Variable If '${LT_APP_ID}' != '' ${LT_APP_ID} lt://proverbial-android


# ${REMOTE_URL}= Set Variable https://%{username}:%{accesskey}@${REMOTE_URL}/wd/hub
${REMOTE_URL}= Set Variable https://${username}:${accesskey}@${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
Open Application ${REMOTE_URL} platformName=android platformVersion=${platformVersion} deviceName=${deviceName} 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
18 changes: 11 additions & 7 deletions Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
Library AppiumLibrary

*** Variables ***

#${username} username
#${accesskey} accesskey
${LT_GRID_URL} https://${username}:${accesskey}@mobile-hub.lambdatest.com/wd/hub
${platformName} ios
#${platformVersion} 15 # Set your default version
${platformVersion} 15 # Set your default version
${deviceName} iPhone.*
${visual} True
${network} True
${isRealMobile} True
${LT_APP_ID} ''
${LT_GRID_URL} ''
#${LT_APP_ID} 'APPID'
${TIMEOUT} 3000
${devicelog} True



*** Keywords ***
Expand All @@ -20,7 +23,7 @@ Open test app
[Timeout] ${TIMEOUT}
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... platformVersion=${platformVersion}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
Expand All @@ -39,9 +42,10 @@ Open test app
EXCEPT
${APP_ID}= Set Variable lt://proverbial-ios
END
${REMOTE_URL}= Set Variable https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@${REMOTE_URL}/wd/hub
${REMOTE_URL}= Set Variable https://${username}:${accesskey}@${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
Open Application ${REMOTE_URL} platformName=ios platformVersion=${platformVersion} 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
11 changes: 6 additions & 5 deletions Resources/CommonWeb.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Library AppiumLibrary

*** Variables ***

#${username} username
#${accesskey} accesskey
${LT_GRID_URL} https://${username}:${accesskey}@mobile-hub.lambdatest.com/wd/hub
${platformName} android
${platformVersion} 11 # Set your default version
${deviceName} Galaxy.*
Expand All @@ -11,7 +13,6 @@ ${devicelog} True
${network} True
${console} True
${isRealMobile} True
${LT_GRID_URL} ''
${TIMEOUT} 3000


Expand All @@ -21,7 +22,7 @@ Open test app
[Timeout] ${TIMEOUT}
${CAPABILITIES}= Create Dictionary
... platformName=${platformName}
... platformVersion=${version}
... platformVersion=${platformVersion}
... deviceName=${deviceName}
... visual=${visual}
... network=${network}
Expand All @@ -35,9 +36,9 @@ Open test app
EXCEPT
${REMOTE_URL}= Set Variable mobile-hub.lambdatest.com
END
${REMOTE_URL}= Set Variable https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@${REMOTE_URL}/wd/hub
${REMOTE_URL}= Set Variable https://${username}:${accesskey}@${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
Open Application ${REMOTE_URL} platformName=${platformName} platformVersion=${platformVersion} 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
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
selenium==3.141.0
urllib3==1.26.6
robotframework
robotframework-appiumlibrary
# selenium==4.12.0
# urllib3==1.26.6
# robotframework
# robotframework-appiumlibrary