This repository has been archived by the owner on Mar 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
sample_test.robot
39 lines (26 loc) · 1.75 KB
/
sample_test.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
*** Settings ***
Library AppiumLibrary
Library SauceLabs.py
Test Setup Open test application
Test Teardown Close test application
*** Variables ***
${KEY} %{SAUCE_USERNAME}:%{SAUCE_ACCESS_KEY}
${REMOTE_URL} http://${KEY}@ondemand.saucelabs.com:80/wd/hub
${PLATFORM_NAME} Android
${PLATFORM_VERSION} %{platformVersion}
${DEVICE_NAME} %{deviceName}
${APP} http://saucelabs.com/example_files/ContactManager.apk
${DEVICE_ORIENTATION} portrait
${APPIUM_VERSION} 1.5
*** Test Cases ***
Example of connecting to Sauce via Robot Framework
Click element xpath=//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.Button[1]
Input text xpath=//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.ScrollView[1]/android.widget.TableLayout[1]/android.widget.TableRow[4]/android.widget.EditText[1] My Name
Input text xpath=//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.ScrollView[1]/android.widget.TableLayout[1]/android.widget.TableRow[8]/android.widget.EditText[1] [email protected]
Click element xpath=//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.ScrollView[1]/android.widget.TableLayout[1]/android.widget.TableRow[9]/android.widget.Button[1]
*** Keywords ***
Open test application
Open application ${REMOTE_URL} alias=None platformName=${PLATFORM_NAME} platformVersion=${PLATFORM_VERSION} deviceName=${DEVICE_NAME} deviceOrientation=${DEVICE_ORIENTATION} appiumVersion=${APPIUM_VERSION} app=${APP} name=RobotAppiumAndroid
Close test application
Report Sauce status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
Close all applications