Launching from cmd opens multiple Kantu windows

Launching Chrome and Kantu from a .vbs script, passing arguments to the HMTL file produced by testsuites, can lead to multiple Kantu windows opening.

The number of windows is random and so not reproducible: a couple of days ago 4 opened; today 3; last week 2.

The script worked, although the other day it failed several times, making it hard to rule out a cause.

This sounds like some kind of timing issue inside the Kantu launch code. We will try to recreate this.

…although the other day it failed several times,

As a workaround, you can check the macro status and relaunch Kantu if needed. For example script code, please see the run a macro “forever” powershell script.

I considered your suggested workaround yesterday but I’m not sure it’s the optimal solution for my use-case (I’m reading from a csv file and writing to another).

Anyway, if it helps further debugging, some more info…

When the Kantu window opens, multiple messages appear, saying:

“can only run testsuites when it’s not recording or playing”

There must be around 10 of these messages which eventually disappear.

Another issue that may be related (or not - in which case I’m happy to open another post):

My Kantu script opens each URL in a new tab, where it does its business before closing it, and so on.

Sometimes, multiple tabs open with the same page, slowing the script somewhat. At its worst, I’ve seen 8 tabs.

Hope this helps

Hi @admin @TechSupport

This bug is caused from the command

selectWindow | TAB=OPEN |

When it will be solved because it happens that it also opens a large number of tabs in a random way.


Hi @admin @TechSupport

To help you to find and fix this bug i add my code.

Today I create this simple macro and run it more times.

  "Name": "_test_open",
  "CreationDate": "2019-4-11",
  "Commands": [
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
      "Command": "selectWindow",
      "Target": "TAB=OPEN",
      "Value": ""

First time the macro open 1 tab (correct), after i closed firefox, and reopen firefox after some minutes, I run the same macro and this time opend 4 tabs with the same url (wrong).

I never used loop or others commands.

Sometimes give to the error “Error #101: Kantu is not connected to a browser tab”

I use firefox 66 with Windows 7 and Xmodules free installed.

I hope you can quickly correct these errors that make automation difficult…

Thanks, have a nice day

Can you please retest with V5.0? We made improvements in tab handling that should have solved the issue.