cancel
Showing results for 
Search instead for 
Did you mean: 

Do we have any option to use Relative path of en element instead of Actual path while setting property for an element

SharazKM
Level 4
While inspecting any element -By default -Actual path is displayed as property of any element. Do we have the flexibility to alter this to a relative path . Example like .//*[@id='searchText']
3 REPLIES 3

Denis__Dennehy
Level 15
If you are talking about the HTML Path attribute in the Browser interface, then the only option is to have a dynamic path so you can set the full exact path at runtime. This is explained in the Browser Automation Guide. This allows you to get the path of nearby elements and calculate the actual runtime path of other nearby elements. There is no option for wildcard or regular expressions within the HTML path.

SharazKM
Level 4
Hi Dennis, Thanks for your reply. My question is not exactly as you have interpreted - While setting path dynamically - do we need to set exact absolute path of an element or do we have any option to set relative path instead of absolute path. Difference between relative and absolute path can be referred here : https://stackoverflow.com/questions/27183353/what-is-the-difference-bet

Denis__Dennehy
Level 15
The html path has to be exact.