Ask a Question

How to reach the expected object to map in a combox

SOLVED
Alicya619
Occasional Contributor

How to reach the expected object to map in a combox

Hello all,

 

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)

 

 

Thank you

 

Alicia

12 REPLIES 12
AlexKaras
Champion Level 2

Hi Alicia,

 

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?

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
Alicya619
Occasional Contributor

Hello 

 

 

 

Hi,

 

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.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
sonya_m
SmartBear Alumni (Retired)

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?


Sonya Mihaljova
Community and Education Specialist

Alicya619
Occasional Contributor

Hello, 

 

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

Alicia

Hi,

 

Could you provide a screenshot of the problematic object? (Preferably, along with the corresponding Object Browser view.)

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
Alicya619
Occasional Contributor

Hello,

 

I can't send you the Object tree along with the object because it's a combo box, so the object no longer exist when I'm clicking on another object

Hi Alicia,

 

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.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
Alicya619
Occasional Contributor

Hello 

 

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..

 

Alicia

cancel
Showing results for 
Search instead for 
Did you mean: