I'm using Python 2.7 with Selenium WebDriver.
My question is how to print whole page source with print
method.
There is webdriver method page_source
but it returns WebDriver and I don't know how to convert it to String or just print it in terminal
Python WebDriver how to print whole page source (html)
pythonselenium-webdriverwebdriver
Related Question
- Python – How to print without a newline or space
- Python – Convert bytes to a string
- Python – How to sort a dictionary by value
- Python – Converting from a string to boolean in Python
- Python – Get HTML source of WebElement in Selenium WebDriver using Python
- Python – Why is reading lines from stdin much slower in C++ than Python
- Pythonic way to create a long multi-line string
- Python – How to prettyprint a JSON file
Best Solution
.page_source
on awebdriver
instance is what you need: