0

I'm trying to click on an element using selenium and make a calender pop up. I think that the "flex thingy" has something to do with this.

I'm trying to click on the "Date of Travel" button to make the calender pop up on this website: https://www.path2usa.com/travel-companion/

Here's my code

driver.get("https://www.path2usa.com/travel-companion/");
driver.findElement(By.id("form-field-travel_comp_date")).click();

For some reason, the calendar does not pop up.

I'm very new to this and I apologize if this sounds stupid. I'd really appreciate any help!

shady
  • 11
  • 4

1 Answers1

0

Actually this has nothing to do with flex. I had to scroll a bit lower for the calender to pop up. The below code sorted things.

driver.get("https://www.path2usa.com/travel-companion/");   
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("window.scrollBy(0,800)");
Thread.sleep(3000);
driver.findElement(By.id("form-field-travel_comp_date")).click();
shady
  • 11
  • 4