Cant push the button


#1

Cant push the following button, dont know why katalon kant find it

String split_id = "?name=user_proc&case=split&pid=767637"

TestObject split_button = WebUI.modifyObjectProperty(findTestObject('Object Repository/makepayment_in_crm_part_2/splitting_button'),'href', 'equals', split_id, true)
WebUI.click(split_button)
WebUI.scrollToElement(findTestObject('Object Repository/split_3_step/input_submit_splitting_button_in_new_field'), 4)
WebUI.click(findTestObject('Object Repository/split_3_step/input_submit_splitting_button_in_new_field'))

got error that element is not found

2019-09-10 15:11:48.488 ERROR c.k.k.core.keyword.internal.KeywordMain  - ❌ Unable to click on object 'Object Repository/split_3_step/input_submit_splitting_button_in_new_field' (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/split_3_step/input_submit_splitting_button_in_new_field'
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)
	at Registration test 3 step.run(Registration test 3 step:35)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1568117465441.run(TempTestCase1568117465441.groovy:21)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/split_3_step/input_submit_splitting_button_in_new_field' located by 'By.xpath: //*[@type = 'submit' and @class = 'submit']' not found
	at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1097)
	at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
	at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:77)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)
	at Script1566976841187.run(Script1566976841187.groovy:35)
	... 11 more

but this is just a button don’t know why katalon cant find the button


#2

Hi @arturs.pumpa

Can you use the Inspection Tool on your browser, paste the XPath:

//*[@type = 'submit' and @class = 'submit']

and see if it finds the element.

Details about how to use Inspection Tool on Chrome here:

Cheers !


#3

Hello! Thank you for this feature i don’t know about it =)

I can find this button element:


But katalon tell me that he could’t find it. Very strange, facing this first time


#4

i have solved this issue, the problem is that it is new window, i pushed button and this new webpage appears, the only thing need to be done is simple

WebUI.switchToWindowUrl('you URL here')

Now i will always use switchToWindow feature when new window appears! =)

Thank you very much for your help!