Skip to content

Commit 404c8a4

Browse files
add more examples
1 parent 8f04113 commit 404c8a4

4 files changed

Lines changed: 144 additions & 0 deletions

File tree

test_android_emulator.robot

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** Settings ***
2+
3+
Library SeleniumLibrary
4+
Library TestingBot
5+
Library BrowserOptions
6+
7+
Test Setup Open test browser
8+
Test Teardown Close test browser
9+
10+
*** Test Cases ***
11+
12+
Android Chrome Test
13+
Go to https://www.google.com
14+
Page should contain Google
15+
16+
*** Keywords ***
17+
18+
Open test browser
19+
${options}= Get Browser Options chrome
20+
21+
# W3C + Appium capabilities for a TestingBot Android emulator
22+
Call Method ${options} set_capability platformName Android
23+
Call Method ${options} set_capability browserName Chrome
24+
Call Method ${options} set_capability appium:deviceName Pixel.*
25+
Call Method ${options} set_capability appium:platformVersion 16.0
26+
Call Method ${options} set_capability appium:automationName UiAutomator2
27+
28+
# Set custom TestingBot capabilities using tb:options
29+
${tb_options}= Create Dictionary name=Android Emulator Test build=MyTestBuild
30+
Call Method ${options} set_capability tb:options ${tb_options}
31+
32+
Open Testingbot Browser ${options}
33+
34+
Close test browser
35+
Report Testingbot Status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
36+
Close all browsers

test_android_physical.robot

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** Settings ***
2+
3+
Library SeleniumLibrary
4+
Library TestingBot
5+
Library BrowserOptions
6+
7+
Test Setup Open test browser
8+
Test Teardown Close test browser
9+
10+
*** Test Cases ***
11+
12+
Android Chrome Test
13+
Go to https://www.google.com
14+
Page should contain Google
15+
16+
*** Keywords ***
17+
18+
Open test browser
19+
${options}= Get Browser Options chrome
20+
21+
# W3C + Appium capabilities for a TestingBot Android emulator
22+
Call Method ${options} set_capability platformName Android
23+
Call Method ${options} set_capability browserName Chrome
24+
Call Method ${options} set_capability appium:deviceName Pixel.*
25+
Call Method ${options} set_capability appium:platformVersion 16.0
26+
Call Method ${options} set_capability appium:automationName UiAutomator2
27+
28+
# Set custom TestingBot capabilities using tb:options
29+
${tb_options}= Create Dictionary name=Android Emulator Test build=MyTestBuild realDevice=True
30+
Call Method ${options} set_capability tb:options ${tb_options}
31+
32+
Open Testingbot Browser ${options}
33+
34+
Close test browser
35+
Report Testingbot Status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
36+
Close all browsers

test_ios_physical.robot

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** Settings ***
2+
3+
Library SeleniumLibrary
4+
Library TestingBot
5+
Library BrowserOptions
6+
7+
Test Setup Open test browser
8+
Test Teardown Close test browser
9+
10+
*** Test Cases ***
11+
12+
iOS Safari Test
13+
Go to https://www.google.com
14+
Page should contain Google
15+
16+
*** Keywords ***
17+
18+
Open test browser
19+
${options}= Get Browser Options safari
20+
21+
# W3C + Appium capabilities for a TestingBot iOS simulator
22+
Call Method ${options} set_capability platformName iOS
23+
Call Method ${options} set_capability browserName Safari
24+
Call Method ${options} set_capability appium:deviceName iPhone.*
25+
Call Method ${options} set_capability appium:platformVersion 26.*
26+
Call Method ${options} set_capability appium:automationName XCUITest
27+
28+
# Set custom TestingBot capabilities using tb:options
29+
${tb_options}= Create Dictionary name=iOS Safari Test build=MyTestBuild realDevice=True
30+
Call Method ${options} set_capability tb:options ${tb_options}
31+
32+
Open Testingbot Browser ${options}
33+
34+
Close test browser
35+
Report Testingbot Status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
36+
Close all browsers

test_ios_simulator.robot

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** Settings ***
2+
3+
Library SeleniumLibrary
4+
Library TestingBot
5+
Library BrowserOptions
6+
7+
Test Setup Open test browser
8+
Test Teardown Close test browser
9+
10+
*** Test Cases ***
11+
12+
iOS Safari Test
13+
Go to https://www.google.com
14+
Page should contain Google
15+
16+
*** Keywords ***
17+
18+
Open test browser
19+
${options}= Get Browser Options safari
20+
21+
# W3C + Appium capabilities for a TestingBot iOS simulator
22+
Call Method ${options} set_capability platformName iOS
23+
Call Method ${options} set_capability browserName Safari
24+
Call Method ${options} set_capability appium:deviceName iPhone.*
25+
Call Method ${options} set_capability appium:platformVersion 26.0
26+
Call Method ${options} set_capability appium:automationName XCUITest
27+
28+
# Set custom TestingBot capabilities using tb:options
29+
${tb_options}= Create Dictionary name=iOS Safari Test build=MyTestBuild
30+
Call Method ${options} set_capability tb:options ${tb_options}
31+
32+
Open Testingbot Browser ${options}
33+
34+
Close test browser
35+
Report Testingbot Status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS}
36+
Close all browsers

0 commit comments

Comments
 (0)