I need some help with if in katalon recorder

Hello, I want to know how if the value in url = 1,000 and in my csv that should be = 1,500.
how to give the value 1,000 + 1,500 = 2,500 ← in my target url back

command: click
target: id = txtValue
Value: “”

and in my csv the value is 1,500, and the value is:
target: id = txtValue
is 1,000

how to make it into 2,500 can use the command variable? example:
command: if
target: …

Please help me

First run script which return You this value from url:
start with “window.location.href” then work on this value to get only number
return calculated value with return statement

Second - in case of using CSV file in Katalon if You are not familiar with chcek: Please help on Katalon Recorder Data-Driven using CSV
for some info

Third: use “store” command which will add this 2 numbers

1 Like


It’s better than using window.location.href = ‘http://example.com’;

Using replace() is better because it does not keep the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco.

If you want to simulate someone clicking on a link, use window.location.href

If you want to simulate an HTTP redirect, use window.location.replace

You can use assign() methods to JavaScript redirect to other pages like the following:


The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the “back” button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.