Sample code:
score_both_halves = driver.find_element_by_xpath('//label[@data-btn-radio="\'ScoreBothHalves\'"]')
score_both_halves.find_element_by_xpath()
In the second line of code I used a find_element_by_xpath()
method of Webdriver
class with WebElement
object and it works fine.
How is that possible? Is WebElement
class inherits from WebDriver
class in selenium python?
Isn't the WebElement class inherits from WebDriver class in selenium python? If not then how we can use methods of WebDriver class with WebElement object?