We download and parse webpages using beautifulsoup
module, but some pages require logins and other dependencies to function properly.
We can simulate these effects using selenium
to launch a programmatic browser.
The course uses Firefox, but we will be using Google Chrome.
In [2]:
from selenium import webdriver
The webdriver.Chrome()
command launches an interactive browser using selenium
. All commands referencing this new browser
variable will use this specific browser window. There are a variety of browsers available, they just need to be installed.
In [4]:
browser = webdriver.Chrome()
We can then use commands like browser.get()
to load urls:
In [7]:
browser.get('https://automatetheboringstuff.com')
We can now use CSS selectors to interact with specific elements on this page; you can find them in Chrome using the Developer tools:
This web element is then referenced using the browser
method find_element_by_css_selector
. There are a variety of other find
methods, which can reference names, classes, tags, etc.
In [9]:
elem = browser.find_element_by_css_selector('#post-6 > div > ol:nth-child(20) > li:nth-child(1) > a')
Once selected, we can a run a .click()
method on that element to interact with the selected web element.
In [10]:
# Clicks on that first link
elem.click()
We can also select multiple elements on a webpage and storing them in a list using the find_elements_by
method instead of find_element_by
.
In [24]:
# Find all paragraph elements on the current page in the browser (Introduction)
elems = browser.find_elements_by_css_selector('p')
In [25]:
elems
Out[25]:
[<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-1")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-2")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-3")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-4")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-5")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-6")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-7")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-8")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-9")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-10")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-11")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-12")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-13")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-14")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-15")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-16")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-17")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-18")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-19")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-20")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-21")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-22")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-23")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-24")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-25")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-26")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-27")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-28")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-29")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-30")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-31")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-32")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-33")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-34")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-35")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-36")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-37")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-38")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-39")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-40")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-41")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-42")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-43")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-44")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-45")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-46")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-47")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-48")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-49")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-50")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-51")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-52")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-53")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-54")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-55")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-56")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-57")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-58")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-59")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-60")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-61")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-62")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-63")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-64")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-65")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-66")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-67")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-68")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-69")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-70")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-71")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-72")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-73")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-74")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-75")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-76")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-77")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-78")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-79")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-80")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-81")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-82")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-83")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-84")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-85")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-86")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-87")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-88")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-89")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-90")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-91")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-92")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-93")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-94")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-95")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-96")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-97")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-98")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-99")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-100")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-101")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-102")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-103")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-104")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-105")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-106")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-107")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-108")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-109")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-110")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-111")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-112")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-113")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-114")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-115")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-116")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-117")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-118")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-119")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-120")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-121")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-122")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-123")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-124")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-125")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-126")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-127")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-128")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-129")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-130")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-131")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-132")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-133")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-134")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-135")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-136")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-137")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-138")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-139")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-140")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-141")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-142")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-143")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-144")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-145")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-146")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-147")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-148")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-149")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-150")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-151")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-152")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-153")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-154")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-155")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-156")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-157")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-158")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-159")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-160")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-161")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-162")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-163")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-164")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-165")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-166")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-167")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-168")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-169")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-170")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-171")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-172")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-173")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-174")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-175")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-176")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-177")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-178")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-179")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-180")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-181")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-182")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-183")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-184")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-185")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-186")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-187")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-188")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-189")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-190")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-191")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-192")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-193")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-194")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-195")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-196")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-197")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-198")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-199")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-200")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-201")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-202")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-203")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-204")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-205")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-206")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-207")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-208")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-209")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-210")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-211")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-212")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-213")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-214")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-215")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-216")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-217")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-218")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-219")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-220")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-221")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-222")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-223")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-224")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-225")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-226")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-227")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-228")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-229")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-230")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-231")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-232")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-233")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-234")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-235")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-236")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-237")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-238")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-239")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-240")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-241")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-242")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-243")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-244")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-245")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-246")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-247")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-248")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-249")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-250")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-251")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-252")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-253")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-254")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-255")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-256")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-257")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-258")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-259")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-260")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-261")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-262")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-263")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-264")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-265")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-266")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-267")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-268")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-269")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-270")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-271")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-272")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-273")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-274")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-275")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-276")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-277")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-278")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-279")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-280")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-281")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-282")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-283")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-284")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-285")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-286")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-287")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-288")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-289")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-290")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-291")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-292")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-293")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-294")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-295")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-296")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-297")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-298")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-299")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-300")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-301")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-302")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-303")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-304")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-305")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-306")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-307")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-308")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-309")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-310")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-311")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-312")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-313")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-314")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-315")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-316")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-317")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-318")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-319")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-320")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-321")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-322")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-323")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-324")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-325")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-326")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-327")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-328")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-329")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-330")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-331")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-332")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-333")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-334")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-335")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-336")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-337")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-338")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-339")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-340")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-341")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-342")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-343")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-344")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-345")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-346")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-347")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-348")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-349")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-350")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-351")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-352")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-353")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-354")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-355")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-356")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-357")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-358")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-359")>,
<selenium.webdriver.remote.webelement.WebElement (session="e7e5e3f2b6604248ed484f7bb7b9649b", element="0.0986551436868226-360")>]
There are many ways to use the webdriver
to find elements, and they are summarized here.
There are also ways to interact with a webpage, and input our own text as necessary. Let use the search box of the Automate website as the example:
In [44]:
# Element by class name example
searchElem = browser.find_element_by_class_name('search-field')
We can use the .send_keys
method to pass text to this element, and then submit via the form type of that element.
In [46]:
# Send the text 'zophie' to the Search element
searchElem.send_keys('zophie')
# Submit that element, if available
searchElem.submit()
#Clear any existing text sent to the element using 'Ctrl+A' and a new string; otherwise `send_keys` will just append it
#searchElem.sendKeys(Keys.chord(Keys.CONTROL, "a"), "zophie");
We can also use browser functions themselves programmatically, including functions like 'back', 'forward', 'refresh', etc.
In [48]:
browser.back()
browser.forward()
browser.refresh()
We can also quit the entire browser with .quit()
.
In [49]:
browser.quit()
We can also use Python scripts to read the content via the selenium
browser.
In [51]:
browser = webdriver.Chrome()
browser.get('https://automatetheboringstuff.com')
elem = browser.find_element_by_css_selector('#post-6 > div > p:nth-child(6)')
All web elements have a .text()
variable that stores all text of the element.
In [52]:
elem.text
Out[52]:
'Everyone should learn to code, but not everyone needs to become a software engineer or computer scientist. Automate the Boring Stuff with Python is written for office workers, students, administrators, and anyone who uses a computer to learn how to code small, practical programs to automate tasks on their computer.'
Similarly, we can select all text on the webpage via the <html>
or <body>
element, which should include all text on the page, since <html>
is the first element on any webpage.
In [53]:
bodyElem = browser.find_element_by_css_selector('html')
print(bodyElem.text)
Skip to content
Automate the Boring Stuff with Python
Practical Programming for Total Beginners
Learn to Code
(Skip to Table of Contents)
"The best part of programming is the triumph of seeing the machine do something useful. Automate the Boring Stuff with Python frames all of programming as these small triumphs; it makes the boring fun."
—Hilary Mason, Founder of Fast Forward Labs
Wil Wheaton on reading Automate the Boring Stuff with Python: "I’m having a lot of fun breaking things and then putting them back together, and just remembering the joy of turning a set of instructions into something useful and fun, like I did when I was a kid."
Automate the Boring Stuff with Python is recommended on the Open Source Summer 2015 Reading List!
Everyone should learn to code, but not everyone needs to become a software engineer or computer scientist. Automate the Boring Stuff with Python is written for office workers, students, administrators, and anyone who uses a computer to learn how to code small, practical programs to automate tasks on their computer.
Have a folder with thousands of files that need to be renamed?
Need to look through thousands of rows in an Excel spreadsheet looking for ones to update?
Have to pull text off of several web pages?
Want to copy the data from hundreds of PDFs?
Have any tedious computer task that you wish you had an intern for?
Normally this would involve hours of mindless clicking and typing. But programming your computer to do it will save you time and effort.
Part 1 of Automate teaches total beginners with no programming experience the Python programming language. Part 2 will be of interest to seasoned developers as well: It covers several modules to extend basic Python skills. Python has a gentle learning curve yet is also used by professional software developers. You don't need to know all the complexities of algorithms and syntax, you just want to write basic programs to automate mundane computer tasks. In the process, even total beginners will learn to use Python to control their computers without having to learn computer science. This is a practical programming guide for the rest of us.
Free to Read Online
Automate the Boring Stuff with Python is released under a Creative Commons license. You can read it, in full, on this website. Programming is a skill that should be in the hands of everyone: No, Seriously, You Should Learn to Code..
Online Course Discount Code
There is also an online course that follows the book if you prefer a video format. Use this link to enter the discount code HALF_OFF and get 50% off the full price. You can also see the first 15 videos on YouTube.
Support the Author: Buy the book on Amazon or
the book/ebook bundle directly from No Starch Press.
Read the author's other free Python books:
Table of Contents
Part 1 - The Basics of Python Programming
Introduction
Python Basics
Flow Control
Functions
Lists
Dictionaries and Structuring Data
Manipulating Strings
Part 2 - Automating Tasks
Pattern Matching with Regular Expressions
Reading and Writing Files
Organizing Files
Debugging
Web Scraping
Working with Excel Spreadsheets
Working with PDF and Word Documents
Working with CSV Files and JSON Data
Time, Scheduling Tasks, and Launching Programs
Sending Email and Text Messages
Manipulating Images
Controlling the Keyboard and Mouse with GUI Automation
A - Installing Third-Party Modules
B - Running Programs
C - Answers to Practice Questions
Al Sweigart is the author of Invent Your Own Computer Games with Python, Making Games with Python & Pygame, and Hacking Secret Ciphers with Python. His books are freely available under a Creative Commons license from http://inventwithpython.com.
Built with WordPress | Theme: Eighties by Kopepasah.
selenium
is a very powerful tool, and has a variety of other functions tha cannot be covered in one lesson. Further documentation is available on their website and on the Automate the Boring Stuff Website in Chapter
selenium
, you need to run the from selenium import webdriver
command.browser = webdriver.Chrome()
(Or whatever browser you prefer).browser.get()
with a URL string.browser.find_elements_by_css_selector()
method will return a list of Web Element objects..text.
that contains the element text in a string. .click()
method will click on an element in the browser..send_keys()
method will type into a specific element in the browser..submit()
method will simulate clicking on the Submit button for a form..back()
, .forward()
, .refresh()
, .quit()
. Content source: Vvkmnn/books
Similar notebooks: