Skip to content

Advanced actions to automate, get back data, and reason like human.


Automate

Repeat

Repeat an action or a list of actions on :

🔹locator - element of webpage

🔹parameter - defined in your job settings

🔹custom code - javascript code when complex action

🔹variable - previously stored in scenario with action "set"

While

Loop actions while condition is met :

🔹an element exists

🔹an element does not exist

🔹with custom code

🔹none = number of time

Set max iteration to limit the loop !

Launch subsessions

From a main job, run another job.

Example

You want to track product information (standard subsession) for all articles on merchant site (main job)

Create a standard subsession robot.

Run it from a main job with "launch subsession" action.

Locator has to be a link pointing to url from where you want subsession to open.

Bind parameters on main job if subsession robot has some.

Remove element

To remove a specific element on webpage.

Hint

Can be usefull in a loop to prevent scrolling on webpage : make sure the element you need is always on top.

Set value

When you need to store a value or modify a context value, you can use "set" action to do so.

🔹name your variable. You can use your own variable name, or any existing one. If using an existing value, it will override existing ones (like index for example). Use it carefully in that case.

🔹 Set a value with locator (if you need to pick a value in page) and/or with format (if you need to set value by yourself, or with a custom function)

Hint

To access your value later, just use context as usual, for example in forms ${context.VARIABLE_NAME} or custom code this.context.VARIABLE_NAME

Note

Variables are shared globally, and are bound to existing context, so it remains accessible in any part of scenario.

Get back data

Track

Track container

Note

You would have previously created containers.

To track data in webpage, you have to select a container area where tracks will be made.

Track datafield

Note

You would have previously created fields.

Insert sub-action "Track data field" into "Track container" for each information you have to get back.

Define the field as key when data is concatenated from several containers.

Screenshot

Take a screenshot of :

🔹The whole page

🔹The visible part

🔹Juste an element

Screenshots are available in File manager.

Note

Switch "insert to parent container" when screenshot action is into a track container and watch files in dataviz with "show data" button.

Save as

Save elements on the webpage like files, pictures, links, video, ...

Most of the time your download is just a link :

  • you just have to select the link or anchor that point or leads to the file you need to download : usually, an <a> tag
  • you need to select the way the robot will format the right url : usually a preformated "get link" format should be sufficient

The download is triggered by javascript or user event :

  • you can add any sub-actions to trigger the event if a locator is set, but this should not be needed : robot will automatically click on it
  • robot will wait a download event. If it does not occure, an error will be raised.

Files are available in File manager.

Reason like human

Custom code

Execute javascript custom code when necessary.

If

Run actions only if condition is met :

🔹element exists in webpage

🔹element does not exist

🔹with custom code - you can use locator AND specify custom code for this locator, or just write your javascript code as condition.