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.
Hi,
> Xtragrid gridcontrol
I would recommend to read https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/grids/devexpress-xtragrid/index.html 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/index.html).
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.).