Save current URL using JavaScript

Use case #

As you are crawling a more and more pages you may need to capture the URL that is currently associated with the data you are scraping or interacting with, so that you can later go back to that URL to take further actions. RTILA Studio is able to grab and save the current URL visit it by the Run browser thanks to a simple JavaScript line which you can use in the Property settings.

JavaScript Line to catch current URL #


Add JavaScript line to Property Filters Action #

Create a DataSet then a Property that you can name “Current URL” for instance. Then click on Filters and then in the Actions input field add the JavaScript line and click save. Once you add the JS line you will see the URL appearing in the result table.

Use JavaScript line inside a Variable Command #

Inside a variable command you need to use a slightly different JavaScript line, see below the variant to use below. You will notice that we need use VALUE for Automation commands whereas we use FIELD_VALUE on Properties.


    Powered by BetterDocs

    Leave a Reply