Inserting XPATH expressions into script - Web Based app
Looking for information on inserting XPATH expressions into my scripts. What is happening is that I am getting errors after playing back my script that pertain to clicking on an edit button inside an angular grid page (table). In the developers tools, it’s showing as a <button id="btn_edit_25" type="button" class="btn btn-primary btn-xs ng-binding ng-scope" ng-click="grid.appScope.editItemClick(row.entity.id)" ng-if="grid.appScope.isUser">Edit</button> so need to use an XPATH expression or locator since it is a dynamic field.
Is there a way to do this within Test Complete? We have a field mapping csv file that we used in selenium/Jspringbot to located these button/id’s but not sure how to do that in Test Complete. Any information is greatly appreciated!
When you use "Object Spy", can you find the button that way in TestComplete? I'm assuming since it is a button within a table, it probably is a child object of the Cell... at least, that's best guess. We can probably get around this without needing to use XPath... XPath functionality does exist in TestComplete but... you're not using Selenium any more and there are better, "best practices" ways of accessing objects in TestComplete... so, before using XPath, let's explore those.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider