|
INTERVIEW QUESTIONS
AUTOMATED TESTING TOOLS
SELENIUM
DETAILS
Question: What is the difference between Absolute XPath and Relative Xpath?
Answer: Absolute XPath Absolute XPath starts with the root node or a forward slash (/). The advantage of using absolute is, it identifies the element very fast. Disadvantage here is, if any thing goes wrong or some other tag added in between, then this path will no longer works.
Relative Xpath A relative xpath is one where the path starts from the node of your choise - it doesn't need to start from the root node. It starts with Double forward slash(//) Advantage of using relative xpath is, you don't need to mention the long xpath, you can start from the middle or in between.
Disadvantage here is, it will take more time in identifying the element as we specify the partial path not.
|
|
|
Category |
Selenium Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9263 users |
Added on |
5/9/2016 |
Views |
70062 |
Rate it! |
|
|
Question:
What is the difference between Absolute XPath and Relative Xpath?
Answer:
Absolute XPath Absolute XPath starts with the root node or a forward slash (/). The advantage of using absolute is, it identifies the element very fast. Disadvantage here is, if any thing goes wrong or some other tag added in between, then this path will no longer works.
Relative Xpath A relative xpath is one where the path starts from the node of your choise - it doesn't need to start from the root node. It starts with Double forward slash(//) Advantage of using relative xpath is, you don't need to mention the long xpath, you can start from the middle or in between.
Disadvantage here is, it will take more time in identifying the element as we specify the partial path not. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Selenium Interview Questions & Answers - Exam Mode /
Learning Mode
|