Dear all!
Please answer the question, how do I call method click() for the elements of control without screen coordinates, for example, TMFDockForm, shown in the figure.
Now I have code
repo.MainForm.MFDockForm.Click('23:130'); And I have a problem how call click of button of nfdockform without coordinates.
Thank you in advance!
Ranorex Version 5.4, Codegear Delphi XE3, Windows 10 64bit,
10.0.14393
Method click without coordinates
-
- Posts: 6
- Joined: Fri Mar 17, 2017 3:06 pm
Method click without coordinates
You do not have the required permissions to view the files attached to this post.
Last edited by antonandreev84 on Mon Mar 20, 2017 9:22 am, edited 1 time in total.
Re: Method click without coordinates
Hi,
Unfortunately, there is not enough information in your post to provide a reasonable answer. Please answer the following questions:
Ranorex version?
Used GUI technology (.net, mfc, something 3rd party e.g. devexpress,...)?
Please post a Ranorex Snapshot (not screenshot) of the problematic toolbar.
Generally speaking, if I understand your problem correctly, you want to click a button in the toolbar? But if the individual buttons are not recognizable by Ranorex (either via spy or tracking), this is why there are used coordinates to click in toolbar. Basically, if Ranorex don't recognize individual buttons, it simply clicks at given position within the toolbar frame. Unfortunately, without knowing more about the problematic toolbar (used technology, small demo app), it's hard to say if there is a way to make Ranorex to recognize the individual buttons. How I see it, your only hope is most probably using image recognition.
Unfortunately, there is not enough information in your post to provide a reasonable answer. Please answer the following questions:
Ranorex version?
Used GUI technology (.net, mfc, something 3rd party e.g. devexpress,...)?
Please post a Ranorex Snapshot (not screenshot) of the problematic toolbar.
Generally speaking, if I understand your problem correctly, you want to click a button in the toolbar? But if the individual buttons are not recognizable by Ranorex (either via spy or tracking), this is why there are used coordinates to click in toolbar. Basically, if Ranorex don't recognize individual buttons, it simply clicks at given position within the toolbar frame. Unfortunately, without knowing more about the problematic toolbar (used technology, small demo app), it's hard to say if there is a way to make Ranorex to recognize the individual buttons. How I see it, your only hope is most probably using image recognition.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Method click without coordinates
On a toolbar with no Ranorex recognisable elements I ended up loading an image of the button I wanted to be clicked upon and then I called Click by passing a new Location object with the loaded bitmap image.
-
- Posts: 6
- Joined: Fri Mar 17, 2017 3:06 pm
Re: Method click without coordinates
Hi,
My problem is that the button is pressed in the test, no matter what new coordinates, for example, when the toolbar is moved. In Ranorex Spy buttons not recognized. About System i answered above.
My problem is that the button is pressed in the test, no matter what new coordinates, for example, when the toolbar is moved. In Ranorex Spy buttons not recognized. About System i answered above.
odklizec wrote:Hi,
Unfortunately, there is not enough information in your post to provide a reasonable answer. Please answer the following questions:
Ranorex version?
Used GUI technology (.net, mfc, something 3rd party e.g. devexpress,...)?
Please post a Ranorex Snapshot (not screenshot) of the problematic toolbar.
Generally speaking, if I understand your problem correctly, you want to click a button in the toolbar? But if the individual buttons are not recognizable by Ranorex (either via spy or tracking), this is why there are used coordinates to click in toolbar. Basically, if Ranorex don't recognize individual buttons, it simply clicks at given position within the toolbar frame. Unfortunately, without knowing more about the problematic toolbar (used technology, small demo app), it's hard to say if there is a way to make Ranorex to recognize the individual buttons. How I see it, your only hope is most probably using image recognition.
Re: Method click without coordinates
Thanks for additional details. OK, Ranorex 5.4 is quite old, but this time, upgrading to newest version will not help anyway I'm afraid, there is not much that can be done for Delphi controls, not to mention 3rd-party Delphi controls. The only thing what you can probably try is to switch the Delphi support (in Ranorex settings >> Plugins >> Win32 section) to opposite state of what you currently have set. But I guess that image recognition will be the only way to go. For more details about Ranorex imaging capabilities, check this screencast:
http://www.ranorex.com/support/screencasts.html#c2529
Image-based automation chapter in Ranorex user guide:
http://www.ranorex.com/support/user-gui ... ation.html
And also this blog post:
http://www.ranorex.com/blog/enhanced-fe ... alidation/
http://www.ranorex.com/support/screencasts.html#c2529
Image-based automation chapter in Ranorex user guide:
http://www.ranorex.com/support/user-gui ... ation.html
And also this blog post:
http://www.ranorex.com/blog/enhanced-fe ... alidation/
Last edited by odklizec on Mon Mar 20, 2017 9:38 am, edited 1 time in total.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 6
- Joined: Fri Mar 17, 2017 3:06 pm
Re: Method click without coordinates
How does the pattern recognition work? Where about him you can read? Thanks for the help!
odklizec wrote:Thanks for additional details. OK, Ranorex 5.4 is quite old, but this time, upgrading to newest version will not help anyway I'm afraid, there is not much that can be done for Delphi controls, not to mention 3rd-party Delphi controls. The only thing what you can probably try is to switch the Delphi support (in Ranorex settings >> Plugins >> Win32 section) to opposite state of what you currently have set. But I guess that image recognition will be the only way to go.
-
- Posts: 6
- Joined: Fri Mar 17, 2017 3:06 pm
Re: Method click without coordinates
Hi, thanks for help , Can you tell us in more detail? Or where you can read about this as it is done in practice?
Stub wrote:On a toolbar with no Ranorex recognisable elements I ended up loading an image of the button I wanted to be clicked upon and then I called Click by passing a new Location object with the loaded bitmap image.
Re: Method click without coordinates
Hi antonandreev,
You can try to add the process of your application to the GDI Capture List and see whether this would help identifying the elements. Therefore simply right click on the Form element and choose "Add Process Name to GDI Capture List" (See Screenshot)
If this does not work, you can try to use image based automation, as odklizec already suggested.
I hope, this will help.
regards,
qwertzu
You can try to add the process of your application to the GDI Capture List and see whether this would help identifying the elements. Therefore simply right click on the Form element and choose "Add Process Name to GDI Capture List" (See Screenshot)
If this does not work, you can try to use image based automation, as odklizec already suggested.
I hope, this will help.
regards,
qwertzu
You do not have the required permissions to view the files attached to this post.
Re: Method click without coordinates
I do something along these lines which has worked well for me thus far:antonandreev84 wrote:Hi, thanks for help , Can you tell us in more detail? Or where you can read about this as it is done in practice?Stub wrote:On a toolbar with no Ranorex recognisable elements I ended up loading an image of the button I wanted to be clicked upon and then I called Click by passing a new Location object with the loaded bitmap image.
Code: Select all
Bitmap bmp = Ranorex.Imaging.Load("BitmapFilename.bmp"));
Report.Log(ReportLevel.Info, "Mouse", "Blah de blah.\r\nMouse Left Click loaded bitmap image.");
Report.LogData(ReportLevel.Info, "Item to click upon", bmp);
AUT.RepositoryItem.Self.Click(new Location(bmp, new Imaging.FindOptions(0.9)));