Automated Screenshot and Page Loop


I try to do an automatic task with 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 :confused: 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,

Usually you can monitor the ${!statusOK} variable for that. If you have e. g. a list of 10 items on a page, and now want to click on the 11th item then the click command fails. => !statusOK is now “false” => now you know it is time to go to the next page.