【发布时间】:2021-09-05 02:47:20
【问题描述】:
我有一个网站,我想在其中运行购物车功能的完整过程。一切顺利,直到我单击付款方式并选择借记卡和。将数据放入字段中时,它不接受。如何将数据放入字段中。这是要测试的网站的链接: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");
【问题讨论】:
-
错误是什么?
-
这里是错误截图:prnt.sc/1670u4y
标签: java eclipse selenium selenium-webdriver