-
Notifications
You must be signed in to change notification settings - Fork 1
/
tasks-s.robot
49 lines (34 loc) · 1.15 KB
/
tasks-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
*** Settings ***
Documentation Executes Google image search and stores the first result image. Based on Robocorp example-google-image-search-main
Library RPA.Browser.Selenium
Library Dialogs
*** Variables ***
${ANOTHER_SEARCH_TERM} dog
*** Tasks ***
Image Search With Selenium
# 1.
Open Available Browser %{GOOGLE_URL} maximized=True
#Open Browser %{GOOGLE_URL} browser=chrome
# 2. Hide cookie consent
Click Element If Visible 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