ElementInfo.Exists

Class library usage, coding and language questions.
EmilS
Posts: 5
Joined: Thu Jan 10, 2013 8:44 am

ElementInfo.Exists

Post by EmilS » Thu Jan 17, 2013 8:23 am

Env: WinXP Sp3, IE8, Ranorex 4.01

Hi!
Im currently automating an Web application that frequently uses js lightbox as modular windows.

My problem is this:
I have mapped a static element "e" on Page "p" to repository. To validate that the page "p" is visible i use eInfo.Exists(), no problems so far.
After opening and closing a lightbox on same page, the eInfo.Exists() always returns false.

RanorexSpy finds the element without any problems (before and after lighbox open/close). But by code i can not get this working.

I checked the State property on the Repo base element (to make sure page is not invalid)
Repo.AppName.Self.State
, it returns "complete"

*I use this structure on 20 more pages, to validate that a page is visible. Never seen this problem before.
It seems the lighbox-open/close action causes some problems.
public static bool IsVisible()
{
 return Repo.AppName.PageName.ElementInfo.Exists()
}

EmilS
Posts: 5
Joined: Thu Jan 10, 2013 8:44 am

Re: ElementInfo.Exists

Post by EmilS » Thu Jan 17, 2013 8:46 am

3 hours of troubleshooting :shock: , 5 min writing a post on forum :cry: . And now 5 minutes after posting i found the problem :oops: .

Element SearchTimeOut was too small, adding a few seconds to searchTimeOut solved the problem.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: ElementInfo.Exists

Post by Support Team » Thu Jan 17, 2013 10:40 am

Hi,

We are glad you were able to fix the problem ;).

Regadrs,
Markus
.
Image