【问题标题】:How to get stripe element in cypress如何在柏树中获取条纹元素
【发布时间】:2021-12-29 08:25:47
【问题描述】:

我想在 Ionic 上使用条带支付为 Web 应用程序编写端到端测试,但在条带 iframe 字段中输入卡号时遇到问题。

我检查了Testing Stripe Elements with Cypress 以了解如何执行此操作,但它不起作用。

我的 HTML 有这样的结构:

我的结构截图:

你知道怎么做吗?

【问题讨论】:

    标签: javascript testing stripe-payments cypress end-to-end


    【解决方案1】:

    cypress-plugin-stripe-elements 插件应该可以工作:

    这个插件提供了一个fillElementsInput,可以很容易地填写条纹元素输入,而无需cy.wait() hacks或其他任何东西。

    cy.fillElementsInput('cardNumber', '4242424242424242');
    

    【讨论】:

    • 那个库不适合我,但它已经过时了
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-01-27
    • 1970-01-01
    • 2019-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多