We can retrieve a list/array of data from a web page with javascript, using the following logic.

  • Define an empty array variable.
  • Use the "querySelectorAll()" method, in which we specify our Selector.
  • Use the "forEach" loop.
  • Use the "push" method in order to fill our list/array, within the "forEach".
  • Use the "return" command in our Action.
  • Use the "Split Text" Action so as to convert the web array (appears as text) to a real list Variable.

This method could prove very useful when for any reason, we don't want/cannot use an "Extract Data" Action.

The script in a Web Browser

The Script in WinAutomation/ProcessRobot