Suggestion: Set tab target after javascript close tab event

I seen the new function TAB=CLOSE and I really appreciate that.

  1. For the TAB=CLOSE can you add the feature to select manually the target tab after closing the current tab (right, left, or default).

  2. In my case i have a page with a link that triggers javascript that close the current tab, after that, currently, Kantu stop playing macro because lose the target tab. It would so nice if can specify the next target tab with a new command that could be ClickAndSelectWindow; or specify a parameter in the target of Click command, like id=target&tab=1 to target the second tab from the macro beginning.

I confirmed the issue, see the test macro below. I think the right solution is: Kantu has to learn to continue in the - now- active tab once a tab just disappeared.

Current workaround:

Do not let the webpage close the tab itself. Instead:

  • switch back to the main tab

  • then use “selectWindow | tab=closeallother”

      {
        "Name": "closetabtest",
        "CreationDate": "2018-12-21",
        "Commands": [
          {
            "Command": "open",
            "Target": "https://www.includehelp.com/code-snippets/javascript-function-to-close-current-tab-with-confiration.aspx",
            "Value": ""
          },
          {
            "Command": "click",
            "Target": "link=Click for DEMO →",
            "Value": ""
          },
          {
            "Command": "pause",
            "Target": "2000",
            "Value": ""
          },
          {
            "Command": "selectWindow",
            "Target": "tab=1",
            "Value": ""
          },
          {
            "Command": "pause",
            "Target": "2000",
            "Value": ""
          },
          {
            "Command": "click",
            "Target": "/html/body/p/input",
            "Value": ""
          },
          {
            "Command": "pause",
            "Target": "2000",
            "Value": ""
          },
          {
            "Command": "clickAndWait",
            "Target": "link=Python@POS=3",
            "Value": ""
          }
        ]
      }

This is not possible because the other tabs are necessary for the script that it’s running.

And the javascript link, not just close the tab, but focuses another tab (that could not be the adjacent one, but frequently is the left one) and reload a page via ajax (so the url not changes).

For now i found the way to run the macro without stopping.

I switch back to tab 1 (one of three) without closing the tab and I execute with the macro the commands that the javascript link would run.

I cannot use the TAB=CLOSE command because by default focus the tab at the right and I need to focus the tab on the left.