cancel
Showing results for 
Search instead for 
Did you mean: 

Developer express Xtragrid add new row and set value

SOLVED
Nomintsetseg
Regular Visitor

Developer express Xtragrid add new row and set value

Hi guys, I'm facing some difficulties while using keyword test in Xtragrid gridcontrol. 

As shown in attached "Keywordtest.png", in the record Repositorytextedit controls are recognized as Textedit in the name mapping. Because of wndCaption /as shown in Wndcaption.png/ 's value is changing in the data driven test, it runs too slow at Repositorytextedit controls and shows warning like "The "TextEdit6" object was replaced with a similar object".

I also tried to set value by javascript. As shown in attached "AtNewRowPosition.png" picture, there is no row at 0. In that case how I set value in new row position by javascript. I tried to create datatable and set it to grid's datasource. But I don't know it is the best solution or not. 

 

I'm newbie in Testcomplete and my company is going to buy Testcomplete license so soon and before that I'm responsible for clear any issues related to Testcomplete. So please help me in that issue.

Thank you in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Developer express Xtragrid add new row and set value

Hi,

 

Xtragrid gridcontrol

I would recommend to read https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/grids/devexpress-xtragrid... help section.

 

Also I would recommend to watch this video: https://support.smartbear.com/testcomplete/videos/using-the-wildcard-in-the-name-map/ and to read help section dedicated to NameMapping (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/inde...).

 

General rule (applicable not only to TestComplete, I believe): it is a good idea to investigate tested application using Object Browser before recording to get an understanding of whether or not the application uses unique and stable identifiers for UI objects. If identifiers are dynamic, then manual creation of required NameMapped elements will provide you with much better results.

Also, quite often, NameMapping of all elements that your test interacts with is not the best idea. Quite often it is better to NameMap just a set or primary containers (windows, forms, control groups, etc.) and then search for the required control within the container using relevant .FindXXX() methods (.FindChild, .FindAllChildren, .WaitAlias, etc.).

 

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

1 REPLY 1
AlexKaras
Community Hero

Re: Developer express Xtragrid add new row and set value

Hi,

 

Xtragrid gridcontrol

I would recommend to read https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/grids/devexpress-xtragrid... help section.

 

Also I would recommend to watch this video: https://support.smartbear.com/testcomplete/videos/using-the-wildcard-in-the-name-map/ and to read help section dedicated to NameMapping (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/inde...).

 

General rule (applicable not only to TestComplete, I believe): it is a good idea to investigate tested application using Object Browser before recording to get an understanding of whether or not the application uses unique and stable identifiers for UI objects. If identifiers are dynamic, then manual creation of required NameMapped elements will provide you with much better results.

Also, quite often, NameMapping of all elements that your test interacts with is not the best idea. Quite often it is better to NameMap just a set or primary containers (windows, forms, control groups, etc.) and then search for the required control within the container using relevant .FindXXX() methods (.FindChild, .FindAllChildren, .WaitAlias, etc.).

 

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

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors