Hi, @Ryan.Paredez , Thank you for helping me with this issue. The error message is this: Line 19, in <synthetic script>
agencia_input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, agencia_input_css))) Line 80, in until
raise TimeoutException(message, screen, stacktrace) When i try to run the code without the wait.until function I´m getting this error: Line 20, in <synthetic script>
agencia_input = driver.find_element(By.CSS_SELECTOR, agencia_input_css) Line 976, in find_element
return self.execute(Command.FIND_ELEMENT, { Line 226, in intercept_execute
return real_execute(driver_command, params) Line 321, in execute
self.error_handler.check_response(response) Line 242, in check_response
raise exception_class(message, screen, stacktrace) I really can´t understand why the script runs without error locally but when appdynamics try to run it an error occours. Here is my script: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait import time pageUrl = "https://www.itau.com.br" agencia_input_css = '#agencia' conta_input_css = '#conta' login_button_css = '#loginButton' driver.maximize_window() #tried to maximize the window to see if it solves the problem driver.get(pageUrl) time.sleep(5) wait = WebDriverWait(driver, 10) # driver.find_element(By.CSS_SELECTOR, agencia_input_css).send_keys("1234") I´ve tried this method without the wait.until to see if it works but still get an error agencia_input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, agencia_input_css))) agencia_input.send_keys("1234") # driver.find_element(By.CSS_SELECTOR, conta_input_css).send_keys("123456") conta_input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, conta_input_css))) conta_input.send_keys("123456") time.sleep(3) # botao_login = driver.find_element(By.CSS_SELECTOR, login_button_css) login_button = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, login_button_css))) driver.execute_script("(arguments[0]).click();", login_button) print("Título da página de destino :", driver.title) print('Script concluído com sucesso!')
... View more