how to get html code in selenium python

Solutions on MaxInterview for how to get html code in selenium python by the best coders in the world

showing results for - "how to get html code in selenium python"
Alessandra
13 Mar 2017
1#_*_coding: utf-8_*_
2from selenium import webdriver
3import time
4# start web 
5browserbrowser=webdriver.Firefox()
6# get source 
7codebrowser.get("https://en.wikipedia.org")
8html = browser.page_source
9time.sleep(2)
10print(html)
11# close web browser
12browser.close()