SHARE
TWEET

Untitled

a guest Jul 16th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #1st case
  2. from selenium import webdriver
  3. from time import sleep
  4.  
  5. options = webdriver.ChromeOptions()
  6. options.add_argument("--no-sandbox")
  7. options.add_argument("--disable-dev-shm-usage")
  8. #options.add_argument("--headless")
  9.  
  10. driver = webdriver.Chrome('chromedriver',options=options)
  11. driver.get('target_url')
  12. driver.find_element_by_name('id').send_keys(some_id)
  13. driver.quit()
  14.  
  15. #2nd case
  16. from selenium import webdriver
  17. from time import sleep
  18.  
  19. options = webdriver.ChromeOptions()
  20. options.add_argument("--no-sandbox")
  21. options.add_argument("--disable-dev-shm-usage")
  22. options.add_argument("--headless")
  23.  
  24. driver = webdriver.Chrome('chromedriver',options=options)
  25. driver.get('target_url')
  26. driver.find_element_by_name('id').send_keys(some_id)
  27. driver.quit()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top