Can't Sends Keys To Directed Paypal Login Page
I'm writing a Auto-Fill bot for Paypal Checkout. The paypal login page is redirected from another website, so it is slightly different to the offical paypal login page, though the
Solution 1:
In your page there is one loader and after that your login options displays in iframe
so first you need to put ExplicitWait
until your frame get visible and then need to switch into that frame to perform action.
I have following code for the same in Java
WebDriverWait wait = new WebDriverWait(driver, 120);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("injectedUl")));
driver.switchTo().frame(driver.findElement(By.name("injectedUl")));
driver.findElement(By.id("email")).sendKeys("abc@gmail.com");
driver.findElement(By.id("password")).sendKeys("asdsa");
driver.findElement(By.id("btnLogin")).click();
This is equivalent code in Python (Please make correction I'm not much familiar with python )
frame_element = WebDriverWait(driver, 120).until(EC.visibility_of_element_located((By.name, "injectedUl"))
driver.switchTo().frame(driver.find_element_by_name("injectedUl"));
driver.find_element_by_id("email"))send_keys("abc@gmail.com");
driver.find_element_by_id("password")send_keys("asdsa");
driver.find_element_by_id("btnLogin")).click();
Post a Comment for "Can't Sends Keys To Directed Paypal Login Page"