-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_android_physical.robot
More file actions
40 lines (30 loc) · 1.5 KB
/
test_android_physical.robot
File metadata and controls
40 lines (30 loc) · 1.5 KB
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
39
40
*** Settings ***
Library AppiumLibrary
Library TestingBot
Library AppOptions
Test Setup Open test app
Test Teardown Close test app
*** Test Cases ***
Android Sample App Sum Test
Wait Until Page Contains Element accessibility_id=inputA timeout=30s
Input Text accessibility_id=inputA 10
Wait Until Page Contains Element accessibility_id=inputB timeout=30s
Input Text accessibility_id=inputB 5
Wait Until Page Contains Element accessibility_id=sum timeout=30s
Element Text Should Be accessibility_id=sum 15
*** Keywords ***
Open test app
${options}= Get App Options Android
# W3C + Appium capabilities for a TestingBot Android real device
Call Method ${options} set_capability platformName Android
Call Method ${options} set_capability appium:deviceName Pixel.*
Call Method ${options} set_capability appium:platformVersion 16.0
Call Method ${options} set_capability appium:automationName UiAutomator2
Call Method ${options} set_capability appium:app https://testingbot.com/appium/sample.apk
# Set custom TestingBot capabilities using tb:options
${tb_options}= Create Dictionary name=Android Physical App Test build=MyAppBuild realDevice=True
Call Method ${options} set_capability tb:options ${tb_options}
Open Testingbot App ${options}
Close test app
Report Testingbot Status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
Close Application