How to clear values filled in the input by JS using Selenium WebDriver?
<p>So for the sake of learning, I am trying to automate the search process in Expedia.com
my code selects "bundle deals", then "flight+Hotel+Car" then starts entering values. (depending on your location, you might see different sets of panels)</p>

<p>The problem is, I'm trying to automate the departure and arrival date by selecting them and inserting a date in mm/dd/yyyy format. Everything goes perfectly until it tries to input the date in returning date. It inputs the date, and then JS changes the date back, and my test fails.</p>

<pre><code>public void selectDepartingDate(String date)
 {
     WebElement dte= driver.findElement(departDate);
     dte.sendKeys(date);


 }

 public void selectReturningDate(String date)
 {
     driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
     WebElement dte= driver.findElement(arrivalDate);

     dte.sendKeys(date);


 }
</code></pre>

<p>How exactly can i solve this?</p>