Validate NotExists without using max effective timeout?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
qa-auto
Posts: 86
Joined: Mon Aug 05, 2019 10:46 pm

Validate NotExists without using max effective timeout?

Post by qa-auto » Mon Nov 11, 2019 4:31 pm

Hi,

After save or page re-load actions, I want to look for specific error elements to see if any errors occurred. I am using Validate NotExists but it takes so long since it uses the effective timeout.

How can I do the check for errors in 2.5 seconds or so? Can the test override the effective timeout at runtime?

Thanks for the help,
Lorinda

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Validate NotExists without using max effective timeout?

Post by odklizec » Tue Nov 12, 2019 7:47 am

Hi,

I'm afraid, that what you need is not achievable without a little coding. You can use something like this:

Code: Select all

public static void YourMethod(RepoItemInfo txtToolbarInfoElement)
{
    if (!txtToolbarInfoElement.Exists(2500))
    {
        Report.Success("Validation", "Element does not exists.")
    }
}
Eventually, you can go this way, but I'm not quite sure, if the Duration parameter affects Effective search timeout, of given element?...

Code: Select all

public static void YourMethod(RepoItemInfo txtToolbarInfoElement)
{
    Validate.NotExists(txtToolbarInfoElement.AbsolutePath, 2500, "Element does not exists.")
}
In my opinion, 2.5sec timeout is a little too low. I would use, at very least, 10secs. But it depends of typical search speed of given element? So make you the timeout you use, is not lower than usual search speed for error message you want to find (if available).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

qa-auto
Posts: 86
Joined: Mon Aug 05, 2019 10:46 pm

Re: Validate NotExists without using max effective timeout?

Post by qa-auto » Thu Nov 14, 2019 4:31 pm

Hi Pavel,

Thanks for your reply. That's fine on the bit of coding. Thanks for sending the snippet! =)

Have a great day (or evening), Pavel.

Lorinda