Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: int to float python 
Python :: sum range 
Python :: capitalise texts 
Python :: arma-garch model python 
Python :: python colored text in console 
Python :: dataframe rolling window 
Python :: python max counts 
Python :: ipython play audio 
Python :: convert all sizes to terabytes pandas 
Python :: how to access a file from root folder in python project 
Python :: python using end keyword 
Python :: select column in pandas dataframe 
Python :: python trim zero off end of list 
Python :: iloc pandas 
Python :: rotate array in python 
Python :: Python remove duplicate lines from a text file 
Python :: run a for loop in python 
Python :: stemmer nltk 
Python :: accessing a variable from outside the function in python 
Python :: switch case python 3.10 
Python :: plt.scatter background color 
Python :: standard deviation in python without numpy 
Python :: python conditionals 
Python :: * pattern by python 
Python :: python variables 
Python :: how to devided array into parts python 
Python :: how to declare a lambda function in python 
Python :: python convert string to float 
Python :: odoo model 
Python :: how to create a subset of two columns in a dataframe 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =