Advertisement
alphauser420

button 2

Mar 12th, 2024
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.common.by import By
  3. import time
  4.  
  5. driver = webdriver.Chrome()
  6. driver.maximize_window()
  7. driver.get("https://omayo.blogspot.com/")
  8.  
  9. # Assuming "but2" is the ID of the button
  10. button = driver.find_element(By.ID, "but2")
  11.  
  12. # Check if the button is clickable (enabled)
  13. if button.is_displayed() and button.is_enabled():
  14. print("Button is clickable.")
  15. button.click()
  16. else:
  17. print("Button is not clickable.")
  18.  
  19. time.sleep(100)
  20. driver.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement