Reputation: 11
I'm try to do this statements but not successful. Can anyone help me. Thank you alot
if (WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', true) {
WebUI.waitForAlert(2)
WebUI.click(findTestObject('Page_Trang Qun L (1)/FailConfirm'))
WebUI.closeBrowser()
} else {
WebUI.waitForAlert(3)
WebUI.click(findTestObject('Page_Trang Qun L (1)/ThemButton'))
WebUI.waitForAlert(2)
WebUI.click(findTestObject('Page_Trang qun tr SkyAdmin/button_OK'))
WebUI.waitForAlert(2)
WebUI.closeBrowser()
}
Upvotes: 0
Views: 2606
Reputation: 8444
The second parameter of the WebUI.verifyTextPresent()
says if the first parameter is a regular expression.
See https://docs.katalon.com/display/KD/%5BWebUI%5D+Verify+Text+Present.
I do not speak your language, but the text doesn't seem like a regex.
Try changing WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', true)
to WebUI.verifyTextPresent('Nhân viên hiện không rảnh trong khung giờ này', false)
.
Upvotes: 1