Not able to select origin and destination in airline website

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Not able to select origin and destination in airline website

piyush jain
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class testMakemyTripSlider {

public static void main(String[] args) throws InterruptedException {

System.setProperty("","C:\\PIYUSH\\Selenium\\Way2Automation\\Software\\Chrome Driver_win32\\chromedriver.exe");
WebDriver driver=new ChromeDriver();

driver.findElement(By.xpath(".//li[@class='ui-autocomplete-category'][@aria-label='Top Cities : Goa, India ']")).click(); 

Issue is on destination or origin as soon as I write By.xpath(".//*[@id='hp-widget__sTo']")).click();  drop down opens but now I cannot select any city from dropdown list 
using code By.xpath(".//li[@class='ui-autocomplete-category'][@aria-label='Top Cities : Goa, India ']")).click(); 

q1) New to selenium so kindly provide the detail code if possible that helps to explain how to select city in drop down list
q2) Need to select any date similarly and click on select to proceed to next screen   ---> 
                      not require large code present in youtube . scenario is just to select one date from drop down for date field and proceed next 



You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit