XPath - Cannot find the object (KeywordTest)
For several days, TestComplete often does not find several objects. I record a test and I run it and some objects are not found even if I put auto-wait or delay.
In some cases, I've test my XPath in Chrome's console and my XPath works but when put in a selector of a mapping in TestComplete it doesn't work.
I'm trying to acces a button that have no id that I can use because it's auto-generated and it changes all the time.
Here is a the part of the html that contains the button. You can se that the button has a class named "icon-show-datebooks" and it's included in a table that has an Id = "btnShowDatebooks"
If I use the commande $x in chrome with the following XPath, chrome has no problem finding it. But TestComplete don't
I have also tried in TestComplete the following Xpath to find the button include in the table that has an Id, but it doesn't work also (bit it works in the console of chrome) :
I have tried also the full XPath created by Chrome and it doesn't work also :
The selectors in TestComplete :
I don't know anymore want to do. If I cannot wrote XPath manually in the selectors of TestComplete, I'm in trouble.
Hi @klabbe -
In the bottom image you provided are these the selectors TestComplete automatically mapped?
Also what is the error message you are receiving in the TestComplete logs?
In the last image, the ones with the index  are the ones created by TestComplete but they don't work. The index always changes so I cannot use them. It's the reason I need to add manually selectors that will always be the same.
The error is changing depending of the selector.
The one with the selectors generated by TestComplete is this one :
Some of them with the selectors that I added manually (work in the console of Chrome with the "$x" command). You can see that the button as a border in red in the image on the right.