type with selenium python code example

Example 1: how to get html code in selenium python

#_*_coding: utf-8_*_
from selenium import webdriver
import time
# start web 
browserbrowser=webdriver.Firefox()
# get source 
codebrowser.get("https://en.wikipedia.org")
html = browser.page_source
time.sleep(2)
print(html)
# close web browser
browser.close()

Example 2: what is selenium python

# SELENIUM:
# - python library
# - opens up your browser and physically interacts with elements
# - used for task automation and web scraping

Tags:

Misc Example