Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from time import sleep
- from selenium import webdriver
- from selenium.webdriver import ActionChains
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.support import expected_conditions as EC
- from selenium.webdriver.common.keys import Keys
- from selenium.webdriver.common.by import By
- driver = webdriver.Firefox()
- actionChains = ActionChains(driver)
- driver.get("http://neuralnetworksanddeeplearning.com/chap1.html")
- sleep(1)
- # formulas = driver.find_elements(By.CLASS_NAME, 'MathJax_FullWidth')
- formulas = driver.find_element(By.TAG_NAME, 'img')
- # print(len(formulas))
- # for formula in formulas[-5:]:
- # actionChains.context_click(formula).perform()
- # sleep(1)
- # actionChains.context_click(formulas[9]).perform()
- # actionChains.context_click(formulas).perform()
- formulas.send_keys(Keys.)
- sleep(2)
- driver.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement