0
Q:

absolute vs relative xpath

Single Slash “/” is used to create XPath with absolute path 
Double Slash “//” is used to create XPath with relative path 
Xpath stands for XML path
-Absolute Xpath, is a direct way to locate an element and
it uses Complete path.

-On the other hand

Relative Xpath, starts from the middle of the HTML DOM and
You can find unique parent node and simply
start from there to element you want. Less fragile. Less length. Never
fails to identify object even though object’s location changes. It is
written directly from the Web Element using Web Element attribute
Assert: In simple words, if the assert condition is true then the
program control will execute the next test step but if the condition is
false, the execution will stop and further test step will not be executed.
Verify: In simple words, there won’t be any halt in the test execution
even though the verify condition is true or false.
Absolute (/) vs Relative (//) Xpath?
starts with
single slash ( / ). starting from very root
element html and all the way to the element. If any web element is
added or removed absolute xpath changes.
starts
with double slash ( // ).
Syntax = //tagname[@attribute='value']
1

New to Communities?

Join the community