EnsureVisible does not working
Posted: Tue Mar 15, 2011 6:41 pm
Hello,
I use the following code to wait for appearing of the titlebar of the tested app:
The problem is that the repo.FormApp.TitleBarApp.EnsureVisible() always raises the ElementNotFoundException, even the titlebar is already shown.
When I set breakpoint on this line (at this moment I'm sure that titlebar IS visible), I call "HighlightRepositoryItem" from the context menu, and the titlebar becomes highlight. But the repo.FormApp.TitleBarApp.EnsureVisible() still raises the mentioned exception.
OS: Win7 x64, Ranorex Studio v. 3.0.0.11639, repo.FormApp.UseCache is false.
What I'm doing wrong?
Thank You in advance.
I use the following code to wait for appearing of the titlebar of the tested app:
Code: Select all
bool isShown=false;
for (int i=0;i<100;i++)
try
{
if (repo.FormApp.TitleBarApp.EnsureVisible())
{
isShown=true;
break;
}
}
catch (ElementNotFoundException)
{
Delay.Milliseconds(1000);
}
catch(Exception e)
{
Report.Log(ReportLevel.Info, "myapp", "Error: "+e.Message, new RecordItemIndex(2));
break;
}
When I set breakpoint on this line (at this moment I'm sure that titlebar IS visible), I call "HighlightRepositoryItem" from the context menu, and the titlebar becomes highlight. But the repo.FormApp.TitleBarApp.EnsureVisible() still raises the mentioned exception.
OS: Win7 x64, Ranorex Studio v. 3.0.0.11639, repo.FormApp.UseCache is false.
What I'm doing wrong?
Thank You in advance.