I want to click 5 times on an element in selenium how can i do this using for loop or while loop in python i have tried using for loop in python below is the code
nextButton = driver.find_element_by_id("com.sustlabs.ohmassistant:id/btn_next")
for nextButton in range(5):
nextButton.click()
To click() 5 times on an element using Selenium you can use a _
for()_
loop and inducing WebDriverWait for the element_to_be_clickable()as follows:Note : You have to add the following imports :