Currently, I am facing an issue while trying to input text into an input box using sendKeys or JavaScript. Even though I successfully see the value entered into the input field, upon clicking on the search button, I encounter an error message stating that the input field cannot be blank.
The HTML code snippet is as follows:
input id="inputMId" class="" type="text" data-bind="value: mId, onMFieldFocusOut: MId,css{datePicker:isMIdError()}" maxlength="15"
span class="validationMessage" style="display: none;"
span id="MErrorMessage" class="validationMessage" data-bind="text:mErrorMessage,visible:isVisibleMErrorMessage()" style="display: none;"
The approach I attempted is detailed in the following code block:
element.sendKeys("value")
and
JavascriptExecutor js = (JavascriptExecutor)getDriver();
js.executeScript("document.getElementById('inputMId').value='"+testData.get("MId")+"';");
I am carrying out these actions on Internet Explorer 11 utilizing the Serenity framework.
While this implementation runs smoothly on Chrome, it seems to encounter issues on IE 11.