i am trying locate title in html head with the title name XPATH.
i have tried below xpaths but no luck/
i) //contains[@title=’Demo Script Test drive – PHPTRAVELS’]
ii) //head[@title=’Demo Script Test drive – PHPTRAVELS’]
i don’t want full xpaths
please refer below image as well as this link-
You can use the below xpath:
4 nodes in
HTML-DOM, however if you use
driver.find_element(By.XPATH, "//title") command, it would point to the first node.
Also, you could try the below xpath:
//title[text()='Demo Script Test drive - PHPTRAVELS']