Kindly help me in the below scenario:
I have a date picker option in my application. I am trying to capture the date for both Lease start date and Lease Finish Date which is a Read-Only field.
Hence I tried using Javascript function for both the fields. Using this functionality the value is getting entered in both the read-only fields. But the problem is when I click on Submit at last both the date values are getting cleared (which is a mandatory field) and throws error. Kindly help me on thisâŚ
****Start Date****
WebElement leasestartdate = WebUiCommonHelper.findWebElement(findTestObject(âObject Repository/New Request objects/Page_Online Lease Request/input_ctl00cphBodyucCalendarStâ),
10)
WebUI.executeJavaScript(âarguments[0].value=\â26-Jul-2018\ââ, Arrays.asList(leasestartdate))
****End Date****
WebElement leasefinishdate = WebUiCommonHelper.findWebElement(findTestObject(âObject Repository/New Request objects/Page_Online Lease Request/input_ctl00cphBodyucCalendarEnâ),
10)
WebUI.executeJavaScript(âarguments[0].value=\â27-Jul-2018\ââ, Arrays.asList(leasefinishdate))