Skip to content

Instantly share code, notes, and snippets.

@brcontainer
Last active Dec 14, 2019
Embed
What would you like to do?
from selenium import webdriver
lista_nomes = ['Joao Arruda Botelho','Camila Moraes Sarmento','Regina Moreira Salles']
lista_emails = ['joaoab1@teste.com.br', 'camilamsb2@teste.com.br', 'reginams3@teste.com.br']
driver = webdriver.Chrome()
url = "http://painelvix.com/galaxia4/formulario_testes.php?r=UUVJcFdZMXlZcE5XdVU2cGVEUjVMYllMNnVBYS9GajVVUkZ3em9tRDZObz0,"
for k in range(3):
driver.get(url)
driver.find_element_by_name("nome").click()
driver.find_element_by_name("nome").clear()
driver.find_element_by_name("nome").send_keys(lista_nomes[k])
driver.find_element_by_name("email").click()
driver.find_element_by_name("email").clear()
driver.find_element_by_name("email").send_keys(lista_emails[k])
driver.find_element_by_name("perfil[]").click()
try:
driver.find_element_by_xpath("//*/text()[normalize-space(.)='Solicitar']/parent::*").click()
except:
continue
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment