Hi Support,
In a desktop application, two type of form opens up by double-click on record. I have to close the form by click on its cross link but path for cross links are different so how can I integrate this to single step so that RX automatically identify the form and click on close link. RX Path of cross link for both forms are->
1.
titlebar/button[@accessiblename='Close']
2.
container[@controlname='rDockDashboard']/container[@controlname='documentContainer1']
/container[@controlname='DockTabStrip3']
I tried to work by using "or" in repository but it didn't worked, like-> //button[@accessiblename='Close'] or //container[@controlname='DockTabStrip3']
Whats the correct way to make it workable ?
Regards,
Varun.
Work with close links.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Work with close links.
Hello,
You would need to close each form separately using your recording.
Alternatively, you could write User Code to close both forms in one method.
Regards,
Markus (T)
You would need to close each form separately using your recording.
Alternatively, you could write User Code to close both forms in one method.
Regards,
Markus (T)
Re: Work with close links.
Hi Markus,
Thanks for feedback. Well, another problem here I am facing is RX not identifying cross link which appear in various tabs of .net base Desktop application. Can you please provide me with its fix.
FYI, I am providing you with RX snapshot of one of tab window.
Thanks and Regards,
Varun.
Thanks for feedback. Well, another problem here I am facing is RX not identifying cross link which appear in various tabs of .net base Desktop application. Can you please provide me with its fix.
FYI, I am providing you with RX snapshot of one of tab window.
Thanks and Regards,
Varun.
- Attachments
-
- WinTabForCrossLink.rxsnp
- UnIdentifiedCrossLink
- (148.26 KiB) Downloaded 184 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Work with close links.
Hi,
Thanks in advance.
Regards,
Peter
Ranorex Team
What do you mean with "cross link", currently I have no clue which element this should be. Which element you try to get according to the snapshot? Please could you provide us a RxPath or a screenshot of the element?varun wrote:Thanks for feedback. Well, another problem here I am facing is RX not identifying cross link which appear in various tabs of .net base Desktop application. Can you please provide me with its fix.
FYI, I am providing you with RX snapshot of one of tab window.
Thanks in advance.
Regards,
Peter
Ranorex Team
Re: Work with close links.
Hi Peter,
Actually I am talking about close link on the top right corner of tab form. Problem is RX Spy unable to identify this link so in scripting I am facing problem to close the tab form.
As you already have RX snapshot of entire form so now I am providing you with screenshot of close link "CloseLink.png", highlighted in red rectangle. Please go through the attachment and let me know how can I draw tool to click on this link.
I tried by using following code snippet and steps as in "RXSteps_CloseLink.png" file, but unfortunately it's clicking on center of the form instead of close link. Code Snippet -
Please guide.
Thanks,
Varun.
Actually I am talking about close link on the top right corner of tab form. Problem is RX Spy unable to identify this link so in scripting I am facing problem to close the tab form.
As you already have RX snapshot of entire form so now I am providing you with screenshot of close link "CloseLink.png", highlighted in red rectangle. Please go through the attachment and let me know how can I draw tool to click on this link.
I tried by using following code snippet and steps as in "RXSteps_CloseLink.png" file, but unfortunately it's clicking on center of the form instead of close link. Code Snippet -
Code: Select all
var closeDemandWindow = repo.RTSPOWorkbench.CloseDemandWindow;
closeDemandWindow.Click();
Delay.Seconds(2);
Thanks,
Varun.
- Attachments
-
- RX recorded steps
- RXSteps_CloseLink.png (80.03 KiB) Viewed 1342 times
-
- CloseLink
- CloseLink.png (16.38 KiB) Viewed 1342 times
Re: Work with close links.
Support please provide me with the solution of this problem, I have already provided you with required snapshots and screenshots.
Regards,
Varun.
Regards,
Varun.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Work with close links.
Hello Varun,
Is the snapshot you sent me a snapshot from the whole application? If not please send a new snapshot from the whole application.
Is it possible to recognize the element with Microsoft inspect?
As workaround you can try to use mouse coordinates to close the window as shown in the image below. Regards,
Bernhard
Is the snapshot you sent me a snapshot from the whole application? If not please send a new snapshot from the whole application.
Is it possible to recognize the element with Microsoft inspect?
As workaround you can try to use mouse coordinates to close the window as shown in the image below. Regards,
Bernhard
Re: Work with close links.
Hello Bernhard,
Thanks for the feedback. It works by specifying coordinates in the script. I would appreciate if you please tell me why RX Spy was not identifying close link form the tab window. FYI, I have attached RX snapshot of whole tab.
Thanks again.
Regards,
Varun.
Thanks for the feedback. It works by specifying coordinates in the script. I would appreciate if you please tell me why RX Spy was not identifying close link form the tab window. FYI, I have attached RX snapshot of whole tab.
Thanks again.
Regards,
Varun.
- Attachments
-
- TabCloseLink.rxsnp
- CloseLink
- (290.77 KiB) Downloaded 180 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Work with close links.
The reason is that this DocumentTabStrip control is a custom "owner-drawn" control that does not follow the design for testability rules. The "x" button is not a real button, but just a drawn picture and the control does not convey any information about that "x" button to Ranorex.varun wrote: I would appreciate if you please tell me why RX Spy was not identifying close link form the tab window.
If 3rd party controls draw such a button and they follow best-practices, then they also provide information about that button to testing tools and disabled persons, e.g. by implementing the MSAA interface for the "x" button. Sadly, the 3rd party control vendor this application uses is known for not following such best practices...
As a workaround, you can use relative coordinates or image-based locations.
Regards,
Alex
Ranorex Team
Re: Work with close links.
Hi Alex,
Thanks for your feedback. I have another problem here in case of specifying co-ordinates of close link, in such case Test Script successfully executes only in my system but not on other systems, may be they have different resolution.
Please clear my doubts and kindly let me know how I can solve this problem?
Regards,
Varun.
Thanks for your feedback. I have another problem here in case of specifying co-ordinates of close link, in such case Test Script successfully executes only in my system but not on other systems, may be they have different resolution.
Here, are you talking about Image based recording? If so I have tried it but its also not working for this case.As a workaround, you can use relative coordinates or image-based locations.
Please clear my doubts and kindly let me know how I can solve this problem?
Regards,
Varun.
Re: Work with close links.
Support, please let me know if there is any simple solution for this problem.
WR,
Varun.
WR,
Varun.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Work with close links.
Hello Varun,
You can also try
1) pressing the appropriate keyboard shortcut, which is probably Ctrl-F4 (focus first if necessary)
2) invoking the action "Close" on the form below the tab container (example from your snapshot:"frmDemandCurve")
3) image-based click should work fine in this case (for example with grey-scale preprocessing and 0.98 similarity)
4) create a user code method which clicks at the right-upper edge of the container minus a fixed offset which will probably not change
Cheers,
Michael
Ranorex Team
You can also try
1) pressing the appropriate keyboard shortcut, which is probably Ctrl-F4 (focus first if necessary)
2) invoking the action "Close" on the form below the tab container (example from your snapshot:"frmDemandCurve")
3) image-based click should work fine in this case (for example with grey-scale preprocessing and 0.98 similarity)
4) create a user code method which clicks at the right-upper edge of the container minus a fixed offset which will probably not change
Cheers,
Michael
Ranorex Team
Re: Work with close links.
Hi Michael,
Thank you for the response.
I guess, point 1 should work. Will try and let you know in case any further Query.
Thanks again!
Regards,
Varun.
Thank you for the response.
I guess, point 1 should work. Will try and let you know in case any further Query.
Thanks again!
Regards,
Varun.