How to get Text from a WebElement in Selenium (Python)
To get the text stored inside a text element (e.g. a p tag), use the WebElement attribute text.
self.driver.find_element(By.XPATH, "(//p)[2]").text;
To get the text stored inside a text element (e.g. a p tag), use the WebElement attribute text.
self.driver.find_element(By.XPATH, "(//p)[2]").text;
Leave a reply
Your email address will not be published. Required fields are marked*