-1
I am creating an automated design using the Selenium driver. I’m starting with Python actually, and when I create the def function below, it’s locating the elements but it’s not typing the values. If I do the direct code without the def, it types, but within the def function is not typing. I believe you’re failing to do something important.
Follow the code below.
browser = webdriver.Chrome(
executable_path=r'C:\Users\rogerio.junior\Documents\Projetos
Python\Meu_Progama\chromedriver.exe')
browser.get('https://pegasus/Rekrut/Logon/LoginManual')
sleep(2)
browser.maximize_window()
sleep(2)
def Entrar(Login, Senha):
browser.find_element_by_id('Login').send_keys(Login)
browser.find_element_by_id('Senha').send_keys(Senha)
browser.find_element_by_class_name('btn').click()
Entrar("Valorx", "Valory")
It worked, just put the function that had created correctly then. Thank you very much.
– Rogerio Junior