unable to click the button if resolution is changed

Ask general questions here.
arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

unable to click the button if resolution is changed

Post by arun_volam » Fri Jul 09, 2010 2:17 pm

Hi ,
Can any one let me how to click the button if the resolution is changed.Ranorex is not able to find the adapters which are not in visible area of the screen.

i have written scripts and they are working fine in "1024 by 768 pixels" resolution, when i have changed the resolution to "800 by 600" scripts are not working.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: unable to click the button if resolution is changed

Post by Ciege » Fri Jul 09, 2010 3:52 pm

So if Ranorex does not automatically scroll the item into view (and I don't see why it would in the case of a button) what you can do is check either the .visible property or the x/y location of the object compared to your screen resolution or your AUT size.
If it is not visible or off screen, get a path to the scroll bars of your AUT and scroll the AUT until the object is visible.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

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

Re: unable to click the button if resolution is changed

Post by Support Team » Mon Jul 12, 2010 9:39 am

Hi,

You can also try the following two methods.

Focus method
Tries to set the focus on the element.
http://www.ranorex.com/Documentation/Ra ... _Focus.htm

Ensure Visible
Ensures that the element is visible to the user. This is usually accomplished by bringing the element or one of its ancestors to foreground.
http://www.ranorex.com/Documentation/Ra ... isible.htm

Regards,
Peter
Ranorex Support Team
.
Image

arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

Re: unable to click the button if resolution is changed

Post by arun_volam » Wed Jul 14, 2010 6:09 am

Hi ,

when i am using .visible or .ensure visible it is giving me true even it is not visible.And coming to focus
it is not able to focus the button.

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

Re: unable to click the button if resolution is changed

Post by Support Team » Wed Jul 14, 2010 9:25 am

Hi,

Can you please post the exception message you get?

And please can you post us a Ranorex Snapshot of your button:
http://www.ranorex.com/support/user-gui ... html#c2072

Thanks and Regards,
Peter
Ranorex Support Team
.
Image

arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

Re: unable to click the button if resolution is changed

Post by arun_volam » Thu Jul 15, 2010 6:42 am

Hi,

i am not getting any exception but when i am using ensure visible or visible it is giving me true even it is not visible to user.

I have attached the screen shots please look at them.

and i am using the below code.

Ranorex.Button b = "/dom[@domain='apps.ezprints.com']/body/div/div/div/div/div[3]/flexobject/container[@id='mainViewStack']/container[@id='builderView']/toolbar/container[@id='addToCart']/button[@id='_TemplateWidget_Button2']";

MessageBox.Show(b.EnsureVisible().ToString());
b.Focus();
b.Click();

it is flex element.
can please give any other solution for this problem.

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

Re: unable to click the button if resolution is changed

Post by Support Team » Thu Jul 15, 2010 11:50 am

Hi,

Yes we know about that limitation. We are currently working on a code snippit, which we will provide the user a simply functionality to scroll if EnsureVisible() won't work. I will post you the link when the method is available and tested.

Regards,
Peter
Ranorex Support Team
.
Image

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

Re: unable to click the button if resolution is changed

Post by Support Team » Fri Jul 16, 2010 1:12 pm

Hi,

Please take a look to following post
http://www.ranorex.com/forum/how-to-scr ... t1521.html

Regards,
Peter
Ranorex Support Team
.
Image