cancel
Showing results for 
Search instead for 
Did you mean: 

How to reach the expected object to map in a combox

SOLVED
Highlighted
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

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to reach the expected object to map in a combox

Hi,

 

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

12 REPLIES 12
Highlighted
Community Hero

Re: How to reach the expected object to map in a combox

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Occasional Contributor

Re: How to reach the expected object to map in a combox

Hello 

 

 

 

Highlighted
Community Hero

Re: How to reach the expected object to map in a combox

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: How to reach the expected object to map in a combox

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
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: How to reach the expected object to map in a combox

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

Tags (3)
Highlighted
Community Hero

Re: How to reach the expected object to map in a combox

Hi,

 

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

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Occasional Contributor

Re: How to reach the expected object to map in a combox

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

Highlighted
Community Hero

Re: How to reach the expected object to map in a combox

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Occasional Contributor

Re: How to reach the expected object to map in a combox

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

Tags (2)
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors