TestProject Forum

XPath selector -> no match in testproject but match in chrome xpath evluation


i have the following xpath selector:

//div[1][@data-itemid = 'viewport/wizard-dialog-phone/panel/objectpool/of-tabpanel/objectsearchview/container/container/datalistview-objects/gridrow']/div[1]/div[3]/div

when i evaluate this xpath in chrome i can find the element:


if i use exactly the same xpath in testproject recorder i get the message “no match found”

can somebody tell my why?

best regards

Without more info it is hard to say. I would check out the context, as I have run into similar issues when dealing with iframes and other embedded content. So I would need to basically ‘tell’ TestProject the context in which to search for the element. Within advanced options is where the context option is. See below:

In this case, I am telling TestProject to search for my main element WITHIN THE CONTEXT of the iframe in the CONTEXT field.

if i change the context to //* chrome will find 35 elements and testproject still says no match found. i would expect testproject to say “multiple matches found”.

As additional information: i am recording a mobile web test in chrome devicemode as described here How To Record a Web Test for a Mobile Browser - TestProject Documentation

i see that as soon as i am recording with chrome device mode active it takes huge amount of RAM and sometimes chrome freezes. is it possible that testproject just needs a long time to find the element and following it will get a timeout or something?