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.
unable to click the button if resolution is changed
-
- Posts: 17
- Joined: Fri Jul 09, 2010 1:40 pm
Re: unable to click the button if resolution is changed
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 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...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: unable to click the button if resolution is changed
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
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
-
- Posts: 17
- Joined: Fri Jul 09, 2010 1:40 pm
Re: unable to click the button if resolution is changed
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.
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.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: unable to click the button if resolution is changed
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
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
-
- Posts: 17
- Joined: Fri Jul 09, 2010 1:40 pm
Re: unable to click the button if resolution is changed
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.
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.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: unable to click the button if resolution is changed
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
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: unable to click the button if resolution is changed
Hi,
Please take a look to following post
http://www.ranorex.com/forum/how-to-scr ... t1521.html
Regards,
Peter
Ranorex Support Team
Please take a look to following post
http://www.ranorex.com/forum/how-to-scr ... t1521.html
Regards,
Peter
Ranorex Support Team