Yes I have tried both of these methods, but I cannot seem to get them to work or I just dont know where to enter them correctly. Could you send a screenshot of where in Studio to put this information. I have tried editing the attributes of the Obj. but it doesn’t seem to make any difference.
Thank you very much for the information. I was able to locate one object not related to the above but one is a start. I am trying to locate using class and id but this is always the result.
Unable to find the element located by ‘By.xpath: //*[@class = ‘node-group ng-tns-c721-119 ng-star-inserted’ and @id = ‘560’]’. Please recheck the objects properties to make sure the desired element is located. Any ideas?
I agree. The id is a unique value. Thats why I am so confused as to why I cannot get this to work. We have thousands of these elements and all have unique values attributed to them. I can locate things by title without issue now thanks to the post @dave.evers, but id still seems to be an issue.
My main issue is that while we have thousands of these obj. there may be multiple with the same title thus id is the best way to locate these objs. While Katalon seems to be able to find the objs using relative position and some form of normalize.text or something i would think it an easier job for the program and myself if I was able to locate by the id.
You can use @Dave_Evers idea of using arrays like he has shown you, or can also use the array indicator in another way, like:
What this means is to start at the unique id, then move down to the first child svg tag, then notice the double slashes, this just jumps down the HTML “tree” to the first child mat-card tag, and then finally down to the first child mat-card-title tag.
Where this could have concerns is if there are more than one “foreignObject” tags at the same level (where I jumped over). If there is more than 1, then change the double slash to /foreignObject/
The whole idea is to create an unique pathway.
Edit: should you need to use it, there is an array usage that allows you to jump to the last child tag, such as …mat-card-title[last()]. Or second-to-last …mat-card-title[last()-1].