use(TimeCategory, {
today = new Date()
})
def checkoutmonth = (today + 10).format(‘MM’)
print(('checkout month is ’ + checkoutmonth) + ‘\n’)
def checkoutday = (today + 30).format(‘d’)
print(('checkout day is ’ + checkoutday) + ‘\n’)
def currentmonth = (today).format(‘MM’)
print(('Current month is ’ + currentmonth) + ‘\n’)
WebUI.openBrowser(GlobalVariable.G_SiteURL)
WebUI.waitForPageLoad(3)
WebUI.maximizeWindow()
WebUI.waitForElementVisible(findTestObject(‘Object Repository/Web_OR/Landing_page/search_textbox’), 5)
WebUI.setText(findTestObject(‘Object Repository/Web_OR/Landing_page/search_textbox’), 'Boston ')
WebUI.delay(3)
WebUI.click(findTestObject(‘Object Repository/Web_OR/Search_Parking_Landing/google_menu_landing_result1’))
WebUI.click(findTestObject(‘Object Repository/Web_OR/Parking_Results_Page/date_filter’))
WebUI.delay(2)
WebUI.click(findTestObject(‘Object Repository/Web_OR/Parking_Results_Page/checkout_date’))
TestObject to = WebUI.modifyObjectProperty(findTestObject(‘Object Repository/Web_OR/Parking_Results_Page/Date_Selection/date_select’),
'xpath', 'equals', ('//div\[@id="parking-list-checkIn"\]/multiple-date-picker//div\[@class="picker-days-row"\]//span\[text()=' +
checkoutday) + '\]', true)
if (checkoutmonth == currentmonth) {
WebUI.click(to)
}
else {
WebUI.click(findTestObject(‘Object Repository/Web_OR/Parking_Results_Page/Date_Selection/next_month’))
WebUI.click(to)
}
Exception Getting:
Test Cases/Helper/New Test Case FAILED because (of) Unable to click on object ‘Object Repository/Web_OR/Parking_Results_Page/Date_Selection/date_select’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element … is not clickable at point (280, 225). Other element would receive the click:
(Session info: chrome=67.0.3396.99)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘HPUSER-PC’, ip: ‘192.168.0.115’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_102’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\HPUSER~1\AppData\L…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 67.0.3396.99, webStorageEnabled: true}
Session ID: 83831ada311699521ac5bafea24f8118)