I have a list of addresses, where I need to click on each element in the list, then click the access button on the screen, but I'm only able to click on the first element ...
Follow my code and page code, if you can help me, I've been there for some days, and I can not solve it
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from parsel import Selector
driver = webdriver.Chrome('C:\scrapy\chromedriver')
driver.get('https://servicosonline.cpfl.com.br/agencia-webapp/#/login')
sleep(10)
email = driver.find_element_by_xpath('//*[@translate="@APP-COMMON-EMAIL"]')
email.click()
username = driver.find_element_by_id('documentoEmail')
username.send_keys('email')
sleep(0.5)
password = driver.find_element_by_id('senha')
password.send_keys('senha')
sleep(0.5)
sign_in_button = driver.find_element_by_xpath('//*[@valeutype="submit"]')
sign_in_button.click()
sleep(40)
search_button = driver.find_element_by_xpath('//*[@type="search"]')
search_button.click()
sleep(0.5)
teste = driver.find_element_by_xpath('//*[@class="ui-select-choices-row ng-scope active"]')
teste.click()
sleep(1)
acessar = driver.find_element_by_xpath('//*[@class="btn btn-default btn-lg btn-block ng-scope"]')
acessar.click()