Search code examples
javascriptseleniumpaypalwebdriver-ioava

Having an issue interacting with pop-up window Webdriverio


I'm trying to interact with a pop-up PayPal window during my testing using selenium and webdriverio (I'm also using AVA as the test runner). I'm able to switch to the pop-up and when I test if a form element is enabled it returns true. However when I go to set the value of that element I get back this error message :

Console Message 1

Here is my code:

await client
  .window(windowId.paypal)
  .waitForExist('#paypalLogo', 5000)
  .pause(3000)
  .setValue('input#email', 'xxxxxx');

When I use:

const isEnabled = await client
  .window(windowId.paypal)
  .waitForExist('#paypalLogo', 5000)
  .pause(3000)
  .isEnabled('input#email');

console.log(isEnabled);

t.true(isEnabled);

I get back Console result 2

Any suggestions? Thanks


Solution

  • Can you check this issue? https://github.com/paypal/paypal-checkout/issues/199

    I think it's probably due to the fact that the login form is in an iframe.