Hi,
I try to do an automatic task with ui.vision and think I am lost with my macro.
I try to archive the following
- I open a lot of tabs
- Starting a macro
- Loop1 - iterating thru all the tabs
- Copy a specific part of the page to the clipboard
- Loop2 - screenshotting it all
- Do a full desktop screenshot and store it on my disk
- Use the text from the clipboard and use the iterator of the loop
- Is page bottom reached? Do a “Page Down”
- Loop Ends on Page Bottom reached
- Close Tab / Change Tab
- Loop ends on the last Tab is done
I want to archive that every page I opened is fully available as screenshot and the filename is like the topic of the page.
I wish I copied my macro before I totally broke it So let me try to write only what I already have done with my macro
- I open all the tabs
- Count the tabs
- use “store” to store variable “tabcount”, set to 25 (for the counts of the tab)
- use “store” to store variable “tabiterator”, set to 1
- action selectWindow - target tab={tabiterator}
- making a while_v2 with target ${tabiterator}<={tabcount}
- loop 1 starts
- Command: Click on Target xpath://…
- Command: Click on Target xpath://…
- Command: Click on Target xpath://…
- Command: Pause for 3 seconds
Now I press CTRL+C to copy the headline - store new iterator and set it to 1
- making a while_v2 with i <= 6 (6 times page down for the longest page)
- loop 2 starts
- command capturedesktopescreenshot target “{i}.png”
- command localStorageExport target “{i}.png”
- Now the prompot comes up, I can press CTRL+V bevore the number
- sendKey with PG_DOWN
- i=i+1
- loop2 is done
- tabiterator = tabiterator +1
- loop1 is done
This is working… Not so great.
So, I need to check something like “is bottom of the paged reached” but I do not use how to archive this.
Also maybe there is more clever way to copy the page headline than “click, click, click” and store this?
Thanks in advance!
Best Regards,
Björn