简体   繁体   English

与弹出窗口Webdriverio交互时遇到问题

[英]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). 在使用selenium和webdriverio进行测试期间,我尝试与弹出的PayPal窗口进行交互(我也使用AVA作为测试运行程序)。 I'm able to switch to the pop-up and when I test if a form element is enabled it returns true. 我能够切换到弹出窗口,并且当我测试是否启用了表单元素时,它将返回true。 However when I go to set the value of that element I get back this error 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 我回来 控制台结果2

Any suggestions? 有什么建议么? Thanks 谢谢

Can you check this issue? 你能检查这个问题吗? https://github.com/paypal/paypal-checkout/issues/199 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. 我认为这可能是由于登录表单位于iframe中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM