Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python selenium click on agree button

# credit to the Stack Overflow user in the source link

from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome()
driver.get("put_your_URL_here")

# NOTE: actual name of the button is required so remember to change 
# the name from "Accept" to the proper button name
WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Accept']"))).click()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #selenium #click #agree #button
ADD COMMENT
Topic
Name
8+5 =