Relative XPath not working

Hi,

Is there a way we can use relative xpath in assistedge for selector in webapp automation? I am not able to provide absolute xpath or id as both are dynamic. I tried giving relative path in manual selector like:
1."//div/div/div/div/div[2]/div/div/section/div[2]/div[2]/div/ul/li[1]/div/div/div/div/header/div/div[4]/div[2]/div/div/div/div[1]/input"
2.$x("//div/div/div/div/div[2]/div/div/section/div[2]/div[2]/div/ul/li[1]/div/div/div/div/header/div/div[4]/div[2]/div/div/div/div[1]/input")

Both are throwing webelement not found error.
Thanks and Regards
Lakshmi Sankergi

Hi,

Try using Manual Selector approach

Regards,
Amit

Hi Amit,

The above values where provided for Manual selector only. I checked in console for $x("//div/div/div/div/div[2]/div/div/section/div[2]/div[2]/div/ul/li[1]/div/div/div/div/header/div/div[4]/div[2]/div/div/div/div[1]/input") , it is fetching the element, but the same when I use as value for manual selector throws me error.

Hi,

  1. X Path which you have given is not css3XPath. When you are using Manual selector then you should be able to form a condition based on different attribute in following screen

image

  1. If you able to get element using xPath which you have given try using Execute JavaScript activity