Confirmation Box ii

Where do I add the text ‘?direct=1’ in order to run the macro from a saved html without having to click ok on the confirmation box?

You add it to the URL of the local “Kantu website” that you open with Chrome. This web page is generated by Kantu and contains some Javascript that reads these options.

A Windows batch file to run a Selenium IDE/Kantu macro from the command line on looks like this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "file:///D:/mytestcases/DemoAutofill1.html?direct=1&close=1&savelog=log1.txt"

See also Kantu selenium ide command line

Create “Kantu website” for use with the cmdline feature:
create%20remote%20macro1

Hi ulrich,

Thanks a lot for the reply but still not working , it still pops up with the confirmation box, I am using the code below, if I am trying to use the same as you have specified below it will unfurtunetly not even open chrome (changed the location to where my google chrome is based).

cmd /c start “X:\chrome.exe” “file:///C:/Users/alexpaun/Downloads/SIM_V4.html?direct=1&close=1&savelog=log1.txt”

@admin do you have any suggestions ?

Changed the location of the html file.
cmd output, however still displaying the confirmation box once the browser has been opened

X:>start “X:\chrome.exe” “file:///X:\SIM_V4.html?direct=1&close=1&savelog=log1.txt”

Hmmm… I am not sure why the switch is not working for you. As a test, does the bookmark feature work ok for you?
(The bookmark feature uses a similar method as the command line feature)

It that does not help: What version of Windows do you use? (that should not make a difference, but we never know :wink:

Hi Admin,

The bookmark feature works however I will need to run this through cmd to accomplish what I need… I am using windows 10.

Is there any other work around this to disable to confirmation box ?

At the moment I am not sure why you get the confirmation box. I tested again on Windows 10 and all works fine for me, I do not get the box once I add direct=1.

So two more questions:

  • Do you get the same issue with Kantu for Firefox?
  • In the replay settings, did you allow the command line? (It’s enabled by default)

I think I found the issue. Do not use “start”. When I just tested with “start…” I get the confirmation dialog, too.

batch1

Instead just add the Chrome path to the batch file, like shown in our command line example in the docs:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "file:///D:/mytestcases/DemoAutofill1.html?direct=1&close=1&savelog=log1.txt"

Does this solve the issue?

Hi,

I have just upgraded my laptop and yes it works now!
I have tried the same bat file on my previous laptop it is still not working.