Я новичок в селене.Я пытаюсь выбрать дату от RedBus.com, может кто-нибудь помочь мне в этом.Ниже приведен код, который я пробовал.
public class RedBusSearch extends RedBusLibraries {
public RedBus red = null;
public WebDriver driver = null;
@Test public void travel() {
logger = extent.createTest("SpiceJet flight bookin");
red = new RedBus(driver);
delay(3000);
input(red.getSource(), "Hyderabad", "source");
input(red.getDestination(), "Bangalore", "Destination");
click(red.getOnwardDate(), "onwards date");
driver.findElement(By.xpath("//div[@id='rb-calendar_onward_cal']"));
List<WebElement> month = driver.findElements(By.xpath("//div[@class='rb-calendar']/table/tbody/tr/td"));
System.out.println(month.size());
for (WebElement ele : month)
{
if (ele.getText().equals("15"))
ele.findElement(By.linkText("15")).click();
break;
}
}
}
,,,