Regularize XPath
Posted: Mon Mar 26, 2012 11:59 pm
Hi,
When I add an object to repository I can the XPath as below.
I could edit the XPath using Path Editor by removing few parent elements in the hierarchy. Now, I can see the XPath as below.
My question, is there a way to make the path more simple. Probably like '*/input[@id='Login1_nameTextBox']'. Just trying to eliminate the dependency on the hierarchy.
Thanks,
Suraj
When I add an object to repository I can the XPath as below.
Code: Select all
body/form/div[@id='content']/div[@id='LoginPanel']/span/div[1]/input[@id='Login1_nameTextBox']
Code: Select all
*/*/*/*/*/*/input[@id='Login1_nameTextBox']
Thanks,
Suraj