-
Notifications
You must be signed in to change notification settings - Fork 1
/
test-s.robot
51 lines (35 loc) · 1.2 KB
/
test-s.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
39
40
41
42
43
44
45
46
47
48
49
50
51
*** Settings ***
Documentation Executes Google image search and stores the first result image. Based on Robocorp example-google-image-search-main
Library SeleniumLibrary
Library Dialogs
Variables devdata/env.py
*** Variables ***
${ANOTHER_SEARCH_TERM} dog
#*** Test Cases ***
*** Tasks ***
Test Image Search With Selenium
# 1.
Open Browser ${GOOGLE_URL} browser=chrome options=add_argument("--start-maximized")
# 2. Hide cookie consent
Run Keyword And Ignore Error Click Element xpath://button/div[contains(text(), 'I agree')]
# 3.
Search for ${SEARCH_TERM}
# 4. View image search results
Click Link Images
# 5. Screenshot first result
Capture Element Screenshot css:div[data-ri="0"]
# 6. Search dog
Go To ${GOOGLE_URL}
Search for ${ANOTHER_SEARCH_TERM}
# 7. View image search results
Click Link Images
# 8. Screenshot first result
Capture Element Screenshot css:div[data-ri="0"]
# 9.
Close Browser
*** Keywords ***
Search for
[Arguments] ${text}
Input Text name:q ${text}
Press Keys name:q ENTER
Wait Until Page Contains Element search