I am automating a web application which has multiple date pickers
in them. I am sending values in them by using javascriptExecutor
.
IJavaScriptExecutor js = (IJavaScript)driver;
string jscript = (string)js.ExecuteScript("document.getElementById('formSIES:cFechaIniSintomas_input').removeAttribute('readonly',0);");
The problem is that my code does not work in all my date pickers. I have tried with another script
IJavaScriptExecutor js = (IJavaScript)driver;
string jscript = (string)js.ExecuteScript(document.getElementById('formSIES:cFechaIniSintomas_input').setAttribute('value','11/12/2018'););
I went over the format and it is correct. Please check.