Open comand line keeps repeating

Hi there.

I´ve this code:

{
  "Name": "Pruebas",
  "CreationDate": "2019-1-5",
  "Commands": [
    {
      "Command": "csvRead",
      "Target": "pruebas.csv",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "${!COL1}",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "https://aulainfod.educ.gob.ar/administracion/admin_cursos.cgi?",
      "Value": ""
    },
    {
      "Command": "waitForPageToLoad",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "${!COL1}",
      "Value": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "//tr[contains(*, ${!COL1})]/td/font/a",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "te hago la cola ${!LOOP} ",
      "Value": ""
    }
  ]
}

Most of times it keeps repeating the 3rd line, and loading the site.
Some times I get the error:

Any idea?

Please try removing waitForPageToLoad. The OPEN command already waits for the page to load.

In other words, waitForPageToLoad is rarely needed. We have added it only for compatibility to the original Firefox Selenium IDE. In Kantu, it is only needed for complex pages that fire several “page loaded” events, and that could confuse our page wait logic. But even then, I would suggest to use the modern VisualAssert instead of the outdated waitForPageToLoad :wink:

thread hijack, sorry,

my script sometimes does the same thing, it performs the “open” command, then once the page is loaded its as if the page refreshes, this loop continues, i assume indefinitely, until i manually stop the macro.
after manually stopping the macro the log only shows the “open” command run once and nothing else comes after except “macro manually stopped”

    {
  "Name": "script name",
  "CreationDate": "2019-1-14",
  "Commands": [
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "99999999",
      "Value": "!TIMEOUT_MACRO"
    },
    {
      "Command": "store",
      "Target": "2",
      "Value": "!timeout_wait"
    },
    {
      "Command": "store",
      "Target": "fast",
      "Value": "!replayspeed"
    },
    {
      "Command": "store",
      "Target": "TRUE",
      "Value": "!ErrorIgnore"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "selectWindow",
      "Target": "title=My Window",
      "Value": ""
    },
    {
      "Command": "gotoIf",
      "Target": "${!statusOK}",
      "Value": "Login"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "label",
      "Target": "Start",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "www.website.com",
      "Value": ""
    },
    {
      "Command": "label",
      "Target": "Login",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "type",
      "Target": "id=login-name",
      "Value": ""
    },
    {
      "Command": "gotoIf",
      "Target": "!${!statusOK}",
      "Value": "PTA and Profile"
    },
    {
      "Command": "type",
      "Target": "id=login-password",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=login-login-btn",
      "Value": ""
    },
    {
      "Command": "label",
      "Target": "PTA and Profile",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "waitForVisible",
      "Target": "id=pta-close",
      "Value": "60"
    },
    {
      "Command": "storeEval",
      "Target": "document.getElementById(\"pta-close\").click();",
      "Value": ""
    },
    {
      "Command": "label",
      "Target": "wait for error",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "verifyElementPresent",
      "Target": "css=[id*='error-dialog']",
      "Value": ""
    },
    {
      "Command": "gotoIf",
      "Target": "!${!statusOK}",
      "Value": "wait for error"
    },
    {
      "Command": "echo",
      "Target": "element found!",
      "Value": "green"
    },
    {
      "Command": "storeEval",
      "Target": "window.onbeforeunload = null;",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "css=[class*='ui-button-text']",
      "Value": "OK"
    },
    {
      "Command": "gotoLabel",
      "Target": "Login",
      "Value": ""
    }
  ]
}
  • [status]

Playing macro script name

  • [info]

Executing: | bringBrowserToForeground | | |

  • [info]

Executing: | store | 99999999 | !TIMEOUT_MACRO |

  • [info]

Executing: | store | 2 | !timeout_wait |

  • [info]

Executing: | store | fast | !replayspeed |

  • [info]

Executing: | store | TRUE | !ErrorIgnore |

  • [info]

Executing: | store | true | !statusOK |

  • [info]

Executing: | selectWindow | title=My Window | |

  • [error][ignored]

failed to find the tab with locator ‘title=My Window’

  • [info]

Executing: | gotoIf | ${!statusOK} | Login |

  • [info]

Executing: | store | true | !statusOK |

  • [info]

Executing: | label | Start | |

  • [info]

Executing: | open | www.website.com | |

  • [info]

Macro was stopped manually (Runtime 15.73s)

for now i will use a workaround.
instead of using the “open” command i will just use javascript to load the website.

{
      "Command": "storeEval",
      "Target": " window.location = \"www.website.com"; ",
      "Value": ""
    },