verifyElementPresent

Issue still exist

I have a while loop with the verify element present and the while loop breaks and stops after running a few times.
It works when I declare !timeout_wait to 2. But it fails when I set !timeout_wait value to 1.
It’s not failing in the first iteration, maybe after running 30-40 times!

What is the point of waiting to verify the element present? It should just verify if the element is present right? So, it should quickly check and result true or false instead of waiting!!

Hi @mksamadnet Do you have a test macro for us?

Hi

I am running it on a private website and cannot provide an exact macro. Sorry. Here is the while loop I am running! . Try running this and it will stop after some time. The message shown in the window panel is Tag waiting 1s (1) | Line 78 | Round 1/1 and stuck there!

The macro stops after running for some time

{
      "Command": "store",
      "Target": "true",
      "Value": "!errorignore",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "!timeout_wait",
      "Description": ""
    },
    {
      "Command": "verifyElementPresent",
      "Target": "linkText=pay",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "while",
      "Target": "${!statusOK} == false",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=Payment",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK",
      "Description": ""
    },
    {
      "Command": "verifyElementPresent",
      "Target": "linkText=pay",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForPageToLoad",
      "Target": "",
      "Value": "",
      "Description": ""
    },

Ok, thanks for the info. 3 more questions:

  • What version of Ui.Vision are you using?

  • What browser (Firefox, Edge, Chrome)?

  • What OS (Windows, Mac, Linux) and what version?

Hi
I have have used it on different machines and all result is same.

Ui.Vision - 9.0.5
Browser - Chrome
OS - Windows server 2012, 2019, 2022

It’s working fine when we define value 2 or more in timeout wait!

As a test, does it work better with a value of 0 (= Do not retry if first attempt fails).

store | 0 | !timeout_wait

I see the same issue when I keep the timeout value as 0.

Between, are you able to reproduce this error in your side?

We ran this test macro for hours but did not see the "Tag waiting 1s (1) " issue. Does the below macro work for you?

{
  "Name": "verify",
  "CreationDate": "2024-2-23",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ocr.space/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "2",
      "Value": "!timeout_wait",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "fast",
      "Value": "!replayspeed",
      "Description": ""
    },
    {
      "Command": "times",
      "Target": "100012",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "verifyElementPresent",
      "Target": "xpath=//*[@id=\"XXXimageUrl\"]",
      "Value": "",
      "Description": "element is not on page (XXX added)"
    },
    {
      "Command": "type",
      "Target": "id=imageUrl",
      "Value": "${!times}",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}