In my code I wrote this code to enter the expiration date by SendKeys
driver.findElement(By.cssSelector("#passport-exp-date-input-243202807"))
.sendKeys("2021-05-13");
now after entering the date, the calendar pops up with this date and due to this, I am not able to perform the next action which is selecting gender which is a dropdown.
the code for thar is below:
String locator = "select[id='passport-gender-243202807']" +
"[data-sync-to-element='#citizenship-info-view-passport_gender-243202807']"
Select dropdownGender = new Select(driver.findElement(By.cssSelector()));
dropdownGender.selectByVisibleText("Female");
It is giving me an error: “Element is not visible”
Html for expiration date:
<input required="" type="text" id="passport-exp-date-input-243202807"
name="documentExpirationDateInput"
class="form-control expirationDate input-sm orange-calendar
sync validDateFormat date-picker-selector hasDatepicker"
data-language="en" data-date-format="yy-mm-dd"
data-end-date-of-trip="2018-07-07T00:00:00.000-04:00"
data-min-date="0" data-max-date=""
data-sync-to-element="#citizenship-info-view-document_expiration-243202807"
data-ocr="" value="">
Html for gender:
<select required="" type="text" name="gender" id="passport-gender-243202807"
class="form-control input-sm sync" data-ocr=""
data-sync-to-element="#citizenship-info-view-passport_gender-243202807">
<option value="">Gender</option>
<option value="M">Male</option>
<option value="F">Female</option>
</select>