Advertisement
Guest User

xpath

a guest
Sep 15th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.chrome.options import Options
  3. import time
  4.  
  5. options = Options()
  6. options.add_extension('metamask-chrome-9.8.4.crx')
  7.  
  8. driver = webdriver.Chrome('./chromedriver', options = options)
  9. driver.get('https://google.com')
  10.  
  11. time.sleep(2)
  12.  
  13. get_started_button = driver.find_element_by_xpath("//*[@id=\"app-content\"]/div/div[3]/div/div/div/button")
  14. get_started_button.click()
  15.  
  16. input('Press [ENTER] to close browsers...')
  17.  
  18. driver.quit()
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement