collinsanele

Setup selenium on Ubuntu server

Mar 7th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/
  2.  
  3.  
  4. https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/
  5.  
  6.  
  7.  
  8. #Put this in code
  9. #dont forget to pip3 install pyvirtualdisplay
  10.  
  11. from selenium import webdriver
  12. from pyvirtualdisplay import Display
  13.  
  14.  
  15.  
  16. #Important
  17. display = Display(visible=0, size=(800, 600))
  18. display.start()
  19.  
  20. driver = webdriver.Chrome(executable_path="/usr/bin/chromedriver")
  21.  
  22.  
  23. driver.get("https://www.putty.org")
  24. print(driver.title)
Advertisement
Add Comment
Please, Sign In to add comment