我有一个屏幕,我们可以在其中选择 2 个选项
- 在线交付
- 离线交付,它们是标签
一旦我们选择任何 1 选项,硒脚本就会变得太慢
下一个选项是在电话号码中输入文本,大约需要 5-7 分钟
if(deliveryoption.equals("UK_Delivery"))
{
/*WebElement element = driver.findElement(By.xpath("//div[@id='deliveryChoices']/div/label[@for='selectHomeDelivery']"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);*/
driver.findElement(By.cssSelector(".deliveryChoiceSelect>label[for='selectHomeDelivery']>div[class='eMarketingSpot']")).click();
//Thread.sleep(3000);
//WebElement link = driver.findElement(By.id("changeTitleAndNameDetailsLink"));
//CommonUtils.verifyAndClick(link,"", true);
//executor.executeScript("arguments[0].click();", phoneNumber);
driver.findElement(By.xpath("//div[3]/div[2][@class='singleInput']/input[@id='_phone1']")).sendKeys("1234567890" + Keys.TAB);
//CommonUtils.verifyElementExist(phoneNumber, "Phone number text box not present", true);
// CommonUtils.verifyAndInputText(phoneNumber, "1234567890", "Phone number text box not present", true);
CommonUtils.verifyAndInputText(PostalCode, "W1A 1AB", "Postal code number text not present", true);
CommonUtils.verifyAndClick(FindAddressBtn, "Find address button not available", true);
CommonUtils.waitMaxSeconds();
CommonUtils.verifyAndClick(ChooseDeliveryOption, "Select Delivery button not available", true);