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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.