Forum Discussion
Please Find the attachment.
Thanks!!
In the namemapping, edit the identification properties to use:
1) ObjectType as Link
2) ContentText as Case Collections
Remove all other identification parameters.
- shailesh_singh9 years agoOccasional Contributor
Thanks,
I will try and let you know.
Thanks!!
- shailesh_singh9 years agoOccasional Contributor
I edited the identification properties to use:
1) ObjectType as Link
2) ContentText as Case Collections
and try but not able to click that link.
screen attached of mapping (is it correct?)
Thanks!!
- djadhav9 years agoRegular Contributor
You have to check if the link and all the parent objects are being identified(you can use highlight object) after changing the namemapping.
Study this article. It'll help you understand NameMapping better: https://support.smartbear.com/viewarticle/75098/
- AlexKaras9 years agoChampion Level 3
Also, this webinar (https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ from the https://support.smartbear.com/screencasts/testcomplete/ page) might help as well.
- rrivest9 years agoContributor
Your issue is that you are dealing with dynamic objects...
The object identification in Name mapping must take those change (order or visibilty) into account...
Personnaly, I don't use Name mapping because many of the components are just changing too often....
There are 2 aproaches you can use... here are two functions that I use when having to deal with dynamic content...
First one uses Xpath search...
function TimedSearchXPath(msdelay,source,ElementType,StrValue) { var ellapse = HISUtils["StopWatch"]; ellapse["Start"](); var UIObject = null; while ((UIObject == null) & (ellapse["Split"]() < msdelay)) { var UIObject = source["FindChildByXPath"]("//"+ElementType+"[contains(@data-ui-test,'"+StrValue+"')]",true); } if (UIObject == null) { Log["Message"]("Search delay has expired"); return null; }else return UIObject; }
Second one just explores the childs of a root object with given array of peroperties and values, down to a specified depth and for a certain delay...
function WaitFindMyObject(myRoot,myProperties,myValues,Depth,timout) { var myTimer = HISUtils["StopWatch"]; // Initialisation d'un chrono var myObject = null; myTimer["Start"](); // Démarrage du chrono var myObject = myRoot["FindChild"](myProperties, myValues, Depth,true); // Initialisation de l'object (Dummy) // Find an object that corresponds to the specified criteria while ((! myObject["Exists"]) & (myTimer["Split"]() < timout)) { // Si l'object n'existe pas ou que le temps n'est pas écoulé var myObject = myRoot["FindChild"](myProperties, myValues, Depth,true); Delay(200); // Pour ne pas accaparer les ressources machine } var elapsed = myTimer["Stop"](); if (elapsed < timout) // On log le chrono peu importe le résultat, un warning si le délais a expiré. Log["Message"]("Temps de recherche : "+myTimer["ToString"]()); else Log["Message"]("Le délais de "+timout+" ms. est écoulé."); // On log un message car le warning sera créé au retour si requis if (myObject["Exists"]) // On retourne l'object s'il existe, sinon un null return myObject; else return null; }
You'll excuse the french 'comment' as that's my natural language :)
Hope this helps...
Related Content
- 3 years agovbarros
- 5 years agounderqualified
Recent Discussions
- 4 hours agoashly