Home »
MCQs »
Selenium MCQs
Which of the following is the correct syntax for XPath?
43. Which of the following is the correct syntax for XPath?
- Xpath=//tagname[@Attribute='value']
- Xpath=//value[@Attribute='tagname']
- Xpath=//Attribute[@tagname='value']
- Xpath=//value[@tagname='attribute']
Answer: A) Xpath=//tagname[@Attribute='value']
Explanation:
Syntax for XPath is: Xpath=//tagname[@Attribute='value']