I am using sendkeys() to fill the form in my application. When I try to submit the form with all the values in the fields are correct and as per the requirement the form fails to submit. But when i key press the input, the field accepts the values. Can someone please help to overcome this issue? Below is the snippet of the code I use:
WebElement fname = driver.findElement(By.id("txtFirstName"));
fname.clear();
fname.sendKeys("Test");
Below is the html,
<input name="ctl19$ctl20$ctl00$txtFirstName" type="text" maxlength="50"
id="ctl19_ctl20_ctl00_txtFirstName" tabindex="182" class="DTC_txtStandard"
onchange="DealerTrackCanada.CommonObjects.Util.ExtenderControls.DataChangeEventManager.onApplicantNameChange('ctl19_ctl20_ctl00_txtFirstName', 'ctl19_ctl20_ctl00_txtMiddleName', 'ctl19_ctl20_ctl00_txtLastName');"
oldbgc="rgb(255, 255, 153)" style="background-color: rgb(153, 204, 255);">