Skip to content

Commit d0fd0ab

Browse files
committed
Add examples
1 parent 3cdb240 commit d0fd0ab

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ You will see TagUI logging its progress. After it finishes, you can see the resu
2828
docker cp robocat:/home/robocat/flow/top_result.png .
2929
```
3030

31+
![google result](examples/google-result.png)
32+
3133
## Full list of installed dependencies
3234

3335
- [Amazon Corretto 8 (1.8.0)](https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/what-is-corretto-8.html)

examples/google-result.png

65.1 KB
Loading

examples/google.tag

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This flow makes a search on Google, clicks the first result and screenshots the page
2+
3+
// First, visit google.com (www.google.com without https:// works as well)
4+
https://www.google.com
5+
6+
// Look on the web page for an element with 'q' in its text, id or name
7+
// (or some other attributes), then type 'latest movies' and enter
8+
// type q as latest movies[enter]
9+
10+
// Use a more accurate identifier below instead because
11+
// google.com webpage differs for different locations
12+
type //*[@name="q"] as latest movies[enter]
13+
14+
// Click first result using XPath, an identification method
15+
// Learn XPath: https://www.w3schools.com/xml/xpath_intro.asp
16+
// XPath Cheatsheet: https://www.linkedin.com/posts/kensoh_xpath-rpa-tagui-activity-6829673864633704448-Iw-D
17+
click (//*[@class="yuRUbf"])[1]//a
18+
19+
// Wait for 3 seconds so the page can load (wait 3 seconds works as well)
20+
wait 3
21+
22+
// Save a screenshot of the web page to top_result.png
23+
snap page to top_result.png

0 commit comments

Comments
 (0)