Guest User

Untitled

a guest
Feb 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Firefox == 58.0.2
  2. selenium == 3.9.0
  3. geckodriver == 0.19.1
  4. Python == 3.6.4
  5. Debian based Linux (64bit)
  6.  
  7. export PATH=$PATH:/usr/bin/firefox
  8.  
  9. from selenium import webdriver
  10. from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  11.  
  12. cap = DesiredCapabilities().FIREFOX
  13. cap["marionette"] = False
  14. browser = webdriver.Firefox(capabilities=cap, executable_path="/usr/local/bin")
  15.  
  16. link = browser.get('https://duckduckgo.com')
  17. web2 = link.find_element_by_class_name('logo_homepage__tt').text
  18. print(web2)
Add Comment
Please, Sign In to add comment