I am using Selenium webdriver in Python for a web-scraping project.
How to print the HTML text of the selenium.WebElement ?
I intend to use the BeautifulSoup
to parse the HTML to extract the data of interest.
Thanks
It's not possible to get the raw HTML from a WebElement
.
You can get the page source from the browser object though: browser.page_source
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With