Hello, I am trying to create a generic mapped object using xPath. But for some reason TestComplete cannot find the element. I am trying to get the selected selector working. As it is now it d...
sonya_m unfortunately not.. I am experiencing this behavior with multiple random objects. I am also currently in contact with the support desk about this, but there is still no solution.
ApplePen I tried using contains but this won't work because he will find multiple objects. I also checked the XPath and the ones we are using are correct. We are also using the Chrome extension SelectorsHub to validate and copy the XPaths we use.
I can give a bit more clearance why we have this many selectors for one object and give another example.
We have multiple instances of our ERP system, these are all in one TestComplete project, so we only have to maintain one namemapping. Our instances are named after colors for example; Green, Red, Blue, Orange. Currently the instances Green and Red are working and cooperating fine. But now I am implementing some tests for the Blue instance and this one gives trouble. There are random objects with the issue I explained above and we cannot seem to figure out why.
Now my other example:
We try to use the selected object below. This object can be selected in the instances Red and Green.
The XPaths we currently have to detect the object are these.
As you can see in the screenshot below we use the correct XPath for the object.
The XPath of the object we want to find is the fifth selector in my screenshot. But for some reason TestComplete cannot find this selector. When I move the selector above selector 4 he can find it, but then he cannot find selector 4. The other selectors aren't giving any trouble.
Also for this object I tried using contain and even starts-with but when I do this he finds multiple objects. I will copy my XPath below.
ApplePen BiTInternationalTest is the webpage, we currently use * to ensure that all the environments have the same namemapping. In 2022 we get an official one URL for all instances.
I do need to check the browser type.
I can only highlight the object when the fifth selector is on the fourth place, otherwise it says it cannot be found. The other way around is also true.