Skip to content

Commit

Permalink
fixing environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
codeSolicitor committed Jan 5, 2023
1 parent f4f5300 commit 9642615
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 31 deletions.
5 changes: 1 addition & 4 deletions Resources/AndroidCommon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Library AppiumLibrary

*** Variables ***
env var
${LT_USERNAME}= Get Environment Variable LT_USERNAME
${LT_ACCESS_KEY}= Get Environment Variable LT_ACCESS_KEY

@{_tmp}
... platformName: ${platformName}
Expand All @@ -18,7 +15,7 @@ env var

#${BROWSER} ${ROBOT_BROWSER}
${CAPABILITIES} ${EMPTY.join(${_tmp})}
${REMOTE_URL} https://${LT_USERNAME}:${LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
#${app} lt://APP100201841649255527998398
${app} lt://proverbial-android
${TIMEOUT} 3000
Expand Down
7 changes: 2 additions & 5 deletions Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
Library AppiumLibrary

*** Variables ***
env var
${LT_USERNAME}= Get Environment Variable LT_USERNAME
${LT_ACCESS_KEY}= Get Environment Variable LT_ACCESS_KEY

@{_tmp}
... platformName: ${platformName}
... platformVersion: ${version}
... deviceName:${deviceName}
... deviceName: ${deviceName}
... visual: ${visual}
... network: ${network}
... isRealMobile: ${isRealMobile}
Expand All @@ -18,7 +15,7 @@ env var

#${BROWSER} ${ROBOT_BROWSER}
${CAPABILITIES} ${EMPTY.join(${_tmp})}
${REMOTE_URL} https://${LT_USERNAME}:${LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub
#${app} lt://APP100201841649255527998398
${app} lt://proverbial-ios
${TIMEOUT} 3000
Expand Down
37 changes: 15 additions & 22 deletions output.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 6.0.1 (Python 3.10.8 on darwin)" generated="20230105 15:32:32.710" rpa="false" schemaversion="3">
<suite id="s1" name="Android" source="/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Tests/Android.robot">
<robot generator="Robot 6.0.1 (Python 3.10.8 on darwin)" generated="20230105 16:02:28.538" rpa="false" schemaversion="3">
<suite id="s1" name="IOS" source="/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Tests/IOS.robot">
<test id="s1-t1" name="Example of connecting to Lambdatest via Robot Framework" line="13">
<kw name="Open test app" library="AndroidCommon" type="SETUP">
<kw name="Open test app" library="Common" type="SETUP">
<kw name="Open Application" library="AppiumLibrary">
<arg>${REMOTE_URL}</arg>
<arg>platformName=${platformName}</arg>
Expand All @@ -21,30 +21,26 @@ Please check https://github.com/appium/appium/blob/master/docs/en/writing-runnin
| alias | no | alias |</doc>
<kw name="Capture Page Screenshot" library="AppiumLibrary">
<doc>Takes a screenshot of the current page and embeds it into the log.</doc>
<status status="FAIL" starttime="20230105 15:32:34.132" endtime="20230105 15:32:34.135"/>
<status status="FAIL" starttime="20230105 16:02:43.680" endtime="20230105 16:02:43.681"/>
</kw>
<msg timestamp="20230105 15:32:34.132" level="FAIL">No application is open</msg>
<msg timestamp="20230105 15:32:34.136" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: No application is open</msg>
<msg timestamp="20230105 15:32:34.136" level="FAIL">WebDriverException: Message: Unauthorized, either Username or AccessKey is invalid.
</msg>
<status status="FAIL" starttime="20230105 15:32:32.792" endtime="20230105 15:32:34.136"/>
<msg timestamp="20230105 16:02:43.682" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal</msg>
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.682"/>
</kw>
<timeout value="50 minutes"/>
<status status="FAIL" starttime="20230105 15:32:32.792" endtime="20230105 15:32:34.136"/>
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.682"/>
</kw>
<kw name="Close test app" library="AndroidCommon" type="TEARDOWN">
<kw name="Close test app" library="Common" type="TEARDOWN">
<kw name="Close All Applications" library="AppiumLibrary">
<doc>Closes all open applications.</doc>
<status status="PASS" starttime="20230105 15:32:34.137" endtime="20230105 15:32:34.137"/>
<status status="PASS" starttime="20230105 16:02:43.683" endtime="20230105 16:02:43.683"/>
</kw>
<status status="PASS" starttime="20230105 15:32:34.136" endtime="20230105 15:32:34.137"/>
<status status="PASS" starttime="20230105 16:02:43.682" endtime="20230105 16:02:43.683"/>
</kw>
<timeout value="50 minutes"/>
<status status="FAIL" starttime="20230105 15:32:32.792" endtime="20230105 15:32:34.137">Setup failed:
WebDriverException: Message: Unauthorized, either Username or AccessKey is invalid.
</status>
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.683">Setup failed:
Execution terminated by signal</status>
</test>
<status status="FAIL" starttime="20230105 15:32:32.711" endtime="20230105 15:32:34.138"/>
<status status="FAIL" starttime="20230105 16:02:28.539" endtime="20230105 16:02:43.684"/>
</suite>
<statistics>
<total>
Expand All @@ -53,13 +49,10 @@ WebDriverException: Message: Unauthorized, either Username or AccessKey is inval
<tag>
</tag>
<suite>
<stat pass="0" fail="1" skip="0" id="s1" name="Android">Android</stat>
<stat pass="0" fail="1" skip="0" id="s1" name="IOS">IOS</stat>
</suite>
</statistics>
<errors>
<msg timestamp="20230105 15:32:32.721" level="ERROR">Error in file '/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Resources/AndroidCommon.robot' on line 5: Setting variable 'env var' failed: Invalid variable name 'env var'.</msg>
<msg timestamp="20230105 15:32:32.721" level="ERROR">Error in file '/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Resources/AndroidCommon.robot' on line 6: Setting variable '' failed: Invalid variable name ''.</msg>
<msg timestamp="20230105 15:32:32.721" level="ERROR">Error in file '/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Resources/AndroidCommon.robot' on line 7: Setting variable '' failed: Invalid variable name ''.</msg>
<msg timestamp="20230105 15:32:34.136" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: No application is open</msg>
<msg timestamp="20230105 16:02:43.682" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal</msg>
</errors>
</robot>

0 comments on commit 9642615

Please sign in to comment.