0

I am using Kantu (now known by a new name UI.vision), a browser extension to do things on websites automatically, based on Selenium (I assume so).

I want it to print dd-mm-yyyy at the website's url, for example www.webstite.com/date=dd-mm-yyyy, from any day of the past to present. Let say from 01/02/2003 to 18/03/2020, print every single day.

One of the ways to achieve that is to use Kantu's executeScript command. It can execute a Javascript code body (meaning no <head>, only the code inside the <body><script></script></body>) You can look here for better understanding about that command.

And then maybe I need to store the output to a variable and print that variable.

So perhaps the problem is of writing Javascript.

If anyone is using Kantu and understand it, do you know the answer?

BlackXIII
  • 89
  • 6

1 Answers1

0

On the executeScript documentation page you find some good examples. The one that you need is "Get todays date in YYYY-MM-DD format".

executeScript | var d= new Date(); var m=((d.getMonth()+1)<10)?'0'+(d.getMonth()+1):(d.getMonth()+1); return d.getFullYear()+"-"+m+"-"+d.getDate(); | result

The ${result} variable has the date now.