CMA_Senthil
9 years agoOccasional Contributor
Solved
What is an appropriate method to perform a native click in Chrome and Opera?
Hi, I have an issue with native click in Chrome and Opera. I have the below line of code in my script which retuens an anchor link entityObj.childNodes[0].childNodes[0] - This returns an obj...
- 9 years ago
Hi Senthil,
I would suggest that you use TestComplete's special methods, EvaluteXPath of FindChildByXPath, to get an object based on it's HTML information. Here is an example:
// Call the function var obj = page.FindChildByXPath("//A[@class='eqjs-ep-entity-node-button')]", true); // Check the result if (obj != null) { // If the element was found, click it obj.Click(); } else { // If the element was not found, post a message to the log Log.Error("The element was not found."); }
Your code may not work because of the different object trees that browsers can create in a different way.
- 9 years ago
Thank you :)