I am using Selenium WebDriver in python, and I would like to retrieve in a variable the entire page source of the web page (something like the right click option that many web browsers provide to get the page source).
Any help is appreciated
I am using Selenium WebDriver in python, and I would like to retrieve in a variable the entire page source of the web page (something like the right click option that many web browsers provide to get the page source).
Any help is appreciated
Your WebDriver object should have a page_source
attribute, so for Firefox it would look like
from selenium import webdriver
driver = webdriver.Firefox()
driver.page_source