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))