HI, B L
I try to do as this link https://docs.katalon.com/display/KD/%5BWebUI%5D+Modify+Object+Property but i found error as log below
‘Modify xpath of \‘Login\’ button’
new_btn = WebUI.modifyObjectProperty(findTestObject(‘page_Login/btn_Login’), ‘xpath’, ‘equals’, ‘//*[@class = \“mat-raised-button mat-prary\”]’, false)
‘Click on new_btn’
WebUI.click(new_btn)
First, I change xpath to “//*[@class = “mat-raised-button mat-prary”]”
[START] - Start action : Statement - new_btn = com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.modifyObjectProperty(com.kms.katalon.core.testobject.ObjectRepository.findTestObject(page_Login/btn_Login), “xpath”, “equals”, “//*[@class = “mat-raised-button mat-prary”]”, false)
[INFO] - Finding Test Object with id ‘Object Repository/page_Login/btn_Login’
[INFO] - Check Test Object
[INFO] - Check property name
[INFO] - Check modify value
[INFO] - Check match condition
[PASSED] - Modify property of object successfully
[END] - End action : Statement - new_btn = com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.modifyObjectProperty(com.kms.katalon.core.testobject.ObjectRepository.findTestObject(page_Login/btn_Login), “xpath”, “equals”, “//*[@class = “mat-raised-button mat-prary”]”, false)
Next, I click on new_btn
[START] - Start action : click
[INFO] - Checking object
[INFO] - Checking timeout
[INFO] - Finding web element with id: ‘Object Repository/page_Login/btn_Login’ located by ‘By.xpath: //*[@class = ‘mat-raised-button mat’]’ in ‘30’ second(s)
[FAILED] - Unable to click on object ‘Object Repository/page_Login/btn_Login’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/page_Login/btn_Login’ located by ‘By.xpath: //*[@class = ‘mat-raised-button mat’]’ not found)
[FAILED] - Test Cases/Test_WRP FAILED because (of) Unable to click on object ‘Object Repository/page_Login/btn_Login’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/page_Login/btn_Login’ located by ‘By.xpath: //*[@class = ‘mat-raised-button mat’]’ not found)
[END] - End action : click
so i didn’t know why xpath will not changed.
Please recommend me what is wrong on this code.
Thanks