How to obtain the tagname of the parent element in Selenium webdriver?

We can obtain the tagname of the parent element in Selenium webdriver. First of all, we need to identify the child element with help of any of the locators like id, class, name, xpath, or CSS. Then we have to identify the parent with the findElement(By.xpath()) method. We can identify the parent from the child, by localizing … Continue reading How to obtain the tagname of the parent element in Selenium webdriver?