Focus()-Method

Ask general questions here.
StuByZurich
Posts: 18
Joined: Fri Jan 23, 2009 2:04 pm

Focus()-Method

Post by StuByZurich » Tue Feb 17, 2009 10:48 am

Hi,

I got a Input-Element, which is not without scrolling the page visibile for the user.
For this I grabbed the input-element per xpath an set used the Focus()-Method of this element.
My hope was that the browsers scrolls automaticaly to this input-element and makes it visible for the user.
But it doesn't work.
Is this maybe not the correct way?

Oliver

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

Post by Support Team » Tue Feb 17, 2009 3:51 pm

Just use EnsureVisible() instead of Focus() :D

Michael
Ranorex Team