Repository navigation
Expand file tree
/
Copy pathdemo_android.robot
More file actions
53 lines (36 loc) · 1.66 KB
/
Copy pathdemo_android.robot
File metadata and controls
53 lines (36 loc) · 1.66 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
41
42
43
44
45
46
47
48
49
50
51
52
*** Settings ***
Documentation Demo: AI-driven Android test with Robot Framework Agent
... Standalone file - just update the variables below and run
Library AppiumLibrary
Library Agent llm_client=openai llm_model=gpt-4.1 platform_type=mobile element_source=accessibility
*** Variables ***
# Appium server
${APPIUM_URL} http://127.0.0.1:4723
# Device config
${DEVICE_NAME} YOUR_DEVICE_NAME
${PLATFORM_NAME} Android
${AUTOMATION_NAME} UiAutomator2
# App config (choose one)
${APP_PACKAGE} com.google.android.youtube
${APP_ACTIVITY} .app.honeycomb.Shell$HomeActivity
*** Test Cases ***
Demo Youtube
[Documentation] Demo Youtube
Open Demo App
Agent.check instruction=Verify that YouTube watch history is turned off
Agent.Do instruction=Tap the search icon at the top
Agent.Do instruction=Enter "Robot Framework" into the search input box
Agent.check instruction=Confirm every result displayed includes "Robot Framework" in its title or description
Agent.Do instruction=Click on the first search result appearing in the search results list
Agent.Ask question=How many subscribers does the Robot Framework channel have?
*** Keywords ***
Open Demo App
[Documentation] Opens the configured Android app
Open Application
... remote_url=${APPIUM_URL}
... platformName=${PLATFORM_NAME}
... appium:deviceName=${DEVICE_NAME}
... appium:automationName=${AUTOMATION_NAME}
... appium:appPackage=${APP_PACKAGE}
... appium:appActivity=${APP_ACTIVITY}
... appium:noReset=${TRUE}