How do I instruct Katalon to select a date from the Date Picker calendar that is a few days in advance? Example: Select Today’s date + 4 days later
Thanks!
@yuliang.lim First off, do you have to pick the date from the Date Picker calendar in order to set a date in the field? If you do not have to, then I would suggest you just use:
Date todaysDate = new Date();
def futureDate = todaysDate.plus(4).format("MM/dd/yyyy");
WebUI.setText(findTestObject('yourTo'), futureDate)
WebUI.verifyMatch(WebUI.getAttribute(findTestObject('yourTo'), "value"), futureDate, false)
I think the test should be of your website, not the GUI, unless that is the only way to enter the text. Do not click on the date field before the setText and you should click on a field outside of the calendar display area to have the GUI disappear.
If you have to use the Date Picker Calendar, then you are going to have to give more information such as which DPC you are using.