I have an issue to map an object inside a combo box.
Steps followed :
- On TC, click on map object icon and select Point and fix option
- On my app, open the combo box, point object to map and press shift + ctrl + A
- Check object map : I map the border of my object not the object itself. I tried some many times and I also got the same result, I'm not successed to catch only the object, without the border.
Full path of the object expected for :[...].WPFObject("ToggleButton", "", 1)
Full path of the object mapped : WPFObject("ToggleButton", "", 2).WPFObject("ButtonBorder")
Is it possible to "delete" this part ".WPFObject("ButtonBorder")" from the full path ?
NB: usually I used the tree for "Object Browser" but because it's a combo box it's not possible (the combo box closed itself and I click somewhere else)
Solved! Go to Solution.
> nothing allow me to delete it.
Hm-m... Yes, it looks like it is not possible to modify the value of the Object field indeed. Strange and I would report this to Support.
Nevertheless, I was able to map the object as suggested by TestComplete and then, in the NameMapping editor, delete the last mapped object from the NameMapping tree.
If I got your question right, then you may switch to the NameMapping editor, delete WPFObject("ButtonBorder") object that is not necessary and edit identification properties for the WPFObject("ToggleButton", "", 2) one to change its index from recorded '2' to required/expected '1'.
Does this help?
Unfortunately no because I don't when to change the index number.
And I can't switch to the NameMapping editor to removed it, because it's means that I map the object and so I got the "WPFObject("ButtonBorder")" map for my object and then it's not possible to modify it.
I possibly missed something in your question as NameMapped objects can always be edited - https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/edit..., https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/edit... and related articles.
Alex, thank you for providing these articles.
@Alicya619 could you expand on your question a little bit so that the Community could try to help more?
I don't understand how to do "delete WPFObject("ButtonBorder") " part.
Can you please explain me the full process to do it ?
The issue is not that I want to edit the properties of my object, it's I can't map the expected for object. The issue is literally when I'm mapping an object because I can't reach the one I need.
Thank you for your help
Could you provide a screenshot of the problematic object? (Preferably, along with the corresponding Object Browser view.)
Thank you for the screenshot provided.
One note first: as you are testing .NET WPF application, I would recommend you to read the https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/default-properties/pr... and related help articles.
As for your problem: I am still probably missing something obvious...
What I would do is:
-- Open NameMapping editor;
-- Select the Add Object... command from the editor's toolbar;
-- Select the Point And Fix mode in the ensuing Map Object dialog, highlight the required button in your tested application and press Ctrl-Shift-A to fix the selection;
-- In the Map Object dialog delete extra .WPFObject("ButtonBorder") object in the Object field and press the OK button to make the mapping.
Does this help?
P.S. You may also do not edit anything in the Map Object dialog and make mapping as suggested and then delete extra mapped object in the NameMapping editor.
P.P.S. As for your question about why extra object is highlighted and mapped, my guess is that this is because of how UI objects are designed and stacked in your tested application. You may talk to developers and ask them if the ButtonBorder overlaps the button itself and why it is so in case of their positive answer.
BTW, if my guess is correct, then TestComplete may fail to click the button and may report the error that the target button is overlapped with some other object. So I would make initial mapping as suggested by TestComplete and then try to click the button. If the button is clicked, then you may delete ButtonBorder from NameMap. Otherwise, you may rename its Alias to something more meaningful than ButtonBorder and use this Alias in your test code.
I'm testing a WPF application.
The process that you would do is exactly the one I follow and it's was I want to do.
I'm just missing the "delete extra .WPFObject("ButtonBorder") " part. How I can do it after Point and fix object ? I try with suppr, delete, right click on mouse ... nothing allow me to delete it.
PS: I also try the second option mentions and I facing the same issue..