How to fix or a workaround for SelectWindow | OPEN | URL?

Hello, maybe someone could help with this issue I reported several days ago regarding “SelectWindow | open | URL”. Very often gets stuck. Opens the URL but remains in that command and doesn´t continue to th next command. It doesn´t show any error even waiting several minutes and is needed to click in “Stop” and try again. Next time normally the macro works fine.

As you can see in the video I share below, in logs window shows “Executing…” but never passes to the next command. Additionally, in extension icon shows the command number.

The code of this example macro is this:

{
  "Name": "test",
  "CreationDate": "2024-5-1",
  "Commands": [
    {
      "Command": "echo",
      "Target": "Begin",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=open",
      "Value": "https://www.w3schools.com",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Finish",
      "Value": "orange",
      "Description": ""
    }
  ]
}

Thanks

The challenge with this bug is to recreate it.

I assume you are using Chrome? As a test, does the same issue happen with Firefox for you?

Yes, I use Chrome. With this simple macro it happened for me at the second time. I don’t use it in Firefox, since I like more the IDE’s behavior in Chrome. For example in Firefox cannot maximize/minimize the window, and some other different behavior between Chrome and Firefox.

May be you could try several times to see the bug. Actually with a single command macro happens the same, and happens with “open|URL” too.

Thanks

Hi again,

Under Windows10, I’ve tried the same macro about 10 times in Firefox and all worked fine, then I’ve tried again in chrome and the issue was reproduced in less than 5 attempts.

Additionaly, in actual macro after running again when reached the “selectWindow | open | URL”, I got the error below. As mentioned previously, normally the macro only gets stuck and no error is shown, but this time, this error appeared inmediately, even the page was loaded (again in Chrome).

[info]
Executing:  | selectWindow | tab=open | https://www.somewebsite.com/abc/xyz | 
[error]
Line 12 (Sub: macro1): failed to find the tab with locator 'tab=open'
At Line 3 in MAIN_MACRO

I ran your macro more than 200 times in a loop in Chrome 124 and did not see the issue once.

Can you maybe try on a different machine? Maybe another extension is interfering?

I’ve tried in another machine about 10 times and the issue was not reproduced. I supposed can be assumed the issue could be something especific in the computer or related with another extension like you said, since in Firefox doesn´t happen either. Thanks for the help.

1 Like

I dont use multiple tabs because of random bug.
try to create script with the logic on one tab.

Thanks for your suggestion. In this particular case is needed to take data from one URL to compare and do some actions in other URL. Then, I need to have the macro jumping, at least between 2 tabs

It seems is not another extension or specific machine issue, is more related with command “SelectWindow|OPEN|URL” when is used in a loop, as it has been detected by other users