WebUI.scrollToElement(findTestObject(‘Object Repository/100/Page_Review your order/input_Rules of purchase-sale of goods at IKEA online store_btnreview’), 3)
WebUI.delay(1)
//click the element.
WebUI.click(findTestObject(‘Object Repository/100/Page_Review your order/label_Ive read and understood Rules of purchase-sale of goods at IKEA online store’))
//I also tried with check
WebUI.check(findTestObject(‘Object Repository/100/Page_Review your order/input_Rules of purchase-sale of goods at IKEA online store_btnreview’))
//and with a off set //WebUI.clickOffset(findTestObject(‘Object Repository/100/Page_Review your order/input_Rules of purchase-sale of goods at IKEA online store_btnreview’), 863, 1243)
But the checkbox do not want to be marked. I got the commands with the record web button, and put the
try to add and element manually in the object repository
name it “checkbox_iHaveRead”
select xpath option and paste there the xpath: //*[@id=‘checktermscond’]
save the element
then try to click on the element saved “checkbox_iHaveRead”
Of course,
This is the code inside: /Object Repository/100/Page_Review your order/label_Ive read and understood Rules of purchase-sale of goods at IKEA online store . This was done with the record function of Katalon.
The large line that you can not see on the image:
id("checkout")/div[@class="row justify-content-center"]/div[@class="review_section col-12 col-lg-6 offset-lg-1"]/div[@class="terms-conditions_section"]/div[@class="checkbox m-0 my-0"]/label[@class="text"]
I changed to this:
…XPATH
//*[@id=‘checktermscond’]
…
Test Cases/Buy-003 FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to check object ‘Object Repository/checkbox_iHaveRead’
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.CheckKeyword.check(CheckKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.CheckKeyword.execute(CheckKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.check(WebUiBuiltInKeywords.groovy:1039)
Yes, i have tried also with manually element like @ francorebu recomend.
WebUI.check(findTestObject(‘checkbox_iHaveRead’))
WebUI.click(findTestObject(‘checkbox_iHaveRead’))
@Richard.QA : I have the same problem , unable to click or check the checkbox in Katalon , is your problem solved ? if you have the solution please let me know.