【发布时间】:2021-04-11 20:49:28
【问题描述】:
我正在尝试制作一个 python 脚本,它将在this 网站上自动付款。我可以输入信用卡号,但无法访问到期月份或 CVV。
我尝试过的代码
我用它来获取下面的信用卡号字段
我用同样的东西来获取到期月份字段,就像这样,
WebDriverWait(browser, 20).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH, '//iframe[@id="braintree-hosted-field-expirationMonth"]'))) WebDriverWait(browser, 60).until(EC.element_to_be_clickable((By.XPATH, "//input[@class='expirationMonth' and @id='expiration-month']"))).send_keys("12/2024 ")但是这段代码不起作用
所以我想要的是,我想检测 Expiration 字段和 CVV 字段,我使用的方法无法检测到该字段。
【问题讨论】:
-
没有过期月份只有过期日期
标签: python selenium webdriver braintree