What version of Ranorex are you using? When I try to open that snapshot I get an error, but i am a little behind on Ranorex versions (3.0.2 currently) and I don't have the option to upgrade currently...
Anyway, from the screen shot you took it looks like a custom component of some sort that has the button/link embedded in the container. Without being able to look at the Spy Snapshot I cannot give specifics, that will have to wait for support to look at, but in the mean time you can tell Ranorex to click the right center portion of the container and it should click your button.
Component Factory controls
Re: Component Factory controls
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...
Re: Component Factory controls
I am using 3.1.0... I was trying to do right-center click... does not work
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Component Factory controls
Hi,
looks like your thirp party controls do not have accesibility implemented correctly, as Ciege observed correctly.
But basically recording a click action should work on the Element "fhgActivities". By recording this action the right coordinates should be chosen.
Regards,
Tobias
Support Team
looks like your thirp party controls do not have accesibility implemented correctly, as Ciege observed correctly.
But basically recording a click action should work on the Element "fhgActivities". By recording this action the right coordinates should be chosen.
Regards,
Tobias
Support Team
Re: Component Factory controls
Unfortunately "UpperRight", "CenterRight", and "LowerRight" still do not click on the button.
Is there any way to create custom control out of this button or any other solution for this problem?
Thanks.
Is there any way to create custom control out of this button or any other solution for this problem?
Thanks.
Re: Component Factory controls
Can you get the size and coordinates of the control? You can then do some math in code to tell the mouse to click in at a coordinate that you determine at runtime through your math. This way, even if the control size changes or you run your code on a different machine with a different resolution you would still be assured that the click is happening at the right place.
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...
Re: Component Factory controls
When I put absolute coordinate (1253;20) the button was clicked. However, as you said, when I resize application it does not work again.
How I can measure coordinate every time when screen id opened please?
How I can measure coordinate every time when screen id opened please?
Re: Component Factory controls
Through Spy you can find the property that contains the size information about the control. Possibly ClientRectangle or even ScreenRectangle. With the size on the control in a variable you can get the location of the control (top left) from the property ScreenLocation (or similar)... Then with some quick math you can add the X location variable to the length of the control variable minus an arbitrary amount of say 5%. That will give you the X number to click at. Similarly, with the Y location variable plus 1/2 of the height of the control will give you the Y number to click at.
Simple math really...
XToClick = XOfControl + WidthOfControl - 5%OfWidthOfControl
YToClick = YOfControl - 1/2HeightOfControl
The 5% value may need a small tweak to get it just right, but you should be able to get there from here...
Simple math really...
XToClick = XOfControl + WidthOfControl - 5%OfWidthOfControl
YToClick = YOfControl - 1/2HeightOfControl
The 5% value may need a small tweak to get it just right, but you should be able to get there from here...
Last edited by Ciege on Tue Sep 13, 2011 6:55 pm, edited 1 time in total.
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...
Re: Component Factory controls
Thank you! I will try that!