字段不接受输入

Input not accepted by fields

我有一个网站,我想在其中 运行 购物车功能的完整过程。一切顺利,直到我点击付款方式和 select 借记卡 and.While 将数据放入它不接受的字段。如何将数据放入字段中。这是要测试的网站 link:https://vapesuite.allomate.solutions/#/。下面是将数据输入字段的代码。

    wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.xpath("//iframe[contains(@name, 'zoid__paypal_buttons')]")));
System.out.println("We have selected Credit card method");
Thread.sleep(5000);

WebElement debitCreditCardButton = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//span[text()='Debit or Credit Card']")));
debitCreditCardButton.click();
Thread.sleep(5000);
        
driver.switchTo().defaultContent();
js.executeScript("window.scrollBy(0,800)");
//Here is the problem, the below path not working   
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id="credit-card-number"]"))).sendKeys("4111111111111111");

有嵌套的 iframe :

卡号看起来在

div[id^='zoid-paypal-card-fields-uid_']

iframe.

使用此代码:

debitCreditCardButton.click();
Thread.sleep(5000);
driver.switchTo().defaultContent();
js.executeScript("window.scrollBy(0,800)");
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.cssSelector("div[id^='zoid-paypal-card-fields-uid_']")));
// and then send keys to card number input field. 

wait.until(ExpectedConditions.elementToBeClickable(By.id("credit-card-number"))).sendKeys("4111111111111111");