cancel
Showing results for 
Search instead for 
Did you mean: 

CSS selector into namemapping

SOLVED
Highlighted
New Contributor

CSS selector into namemapping

Hello,

I have not been busy with Testcomplete for a long time and I mainly use Keyword tests because I am not a developer. I cannot write code. Now the developers have made an adjustment so that all my tests suddenly fail. This is because I did not set up my namemapping sufficiently uniquely. My colleagues mainly use the CSS selector to give elements a unique ID. They also want me to use it. To what extent is it possible to include the CSS selector in my name mapping? And if that is not possible, what should the developers do so that I can make elements unique enough?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: CSS selector into namemapping

Hi,

 

I am not sure that CSS selector can be used for Namemepping. (Though you can use the value of the 'class' property as one of the identification criterion for Namemapping.)

The best thing that your developers can do to improve testability of their application is to introduce stable and unique IDs for every UI element that automated test needs to interact with.

 

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

2 REPLIES 2
Highlighted
Community Hero

Re: CSS selector into namemapping

Hi,

 

I am not sure that CSS selector can be used for Namemepping. (Though you can use the value of the 'class' property as one of the identification criterion for Namemapping.)

The best thing that your developers can do to improve testability of their application is to introduce stable and unique IDs for every UI element that automated test needs to interact with.

 

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

Highlighted
Community Manager

Re: CSS selector into namemapping

Thanks Alex! 

 

@RegasQA does this approach work for you? Please let us know Smiley Happy


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors