Hello guys, can u help me with this radio button ?
I have recorded this web and when I run the test, the radio button is not checked. I have captured the radio button but still unable to click on object
What is the pathway you are using to click on the first radio button? Is it like:
id("all_request")/tbody/tr[1]/td[1]/label/input
If you want to click on other rows, then you need to parameterize the tr tag and then calculate which row of the table you need to click on. Maybe like:
idRow = 3;
def box = driver.findElement(By.xpath("id('all_request')/tbody/tr[${idRow}]/td[1]/label/input"))
box.click()
I’m used
//div[@id=‘option580965’]/label/i
You should put a backtick, like `, before and after your pathway. That way, the forum’s formatting does not alter what you enter. If you put code, then put 3 backticks above and below your code, like ``` (the backtick is found on the same key as the tilde ~).
I don’t see your id of option580965 in your image at all. How about try my pathway and see if you can click on the first radio button? The id that I am using starts from the table tag and then moves down to the input with type = “radio”, in your image.
import org.openqa.selenium.By as By
import org.openqa.selenium.Keys as Keys
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
WebDriver driver = DriverFactory.getWebDriver()
def box = driver.findElement(By.xpath('id("all_request")/tbody/tr[1]/td[1]/label/input'))
box.click()
Or, copy the pathway and paste it in the xpath of the web element in your OR.
You might even try a pathway using the value attribute or the name attribute of the input radio button:
//input[@value="883_wf_payment_process1"]
//input[@name="d-7075931-checkbox_id"]
Does the error message say anything more, like why it can’t be clicked?
This is All message
=============== ROOT CAUSE =====================
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/3. Joget/Joget DX/Move Payment/New OR Create Request/Page_MOVE PaymentCreate Request/iframe_Memory Used 469 557 MB Datasource A_88868e’ located by ‘//iframe[@id=‘popupSelectFrame_popupselect_726433’]’ not found
02-23-2022 01:28:56 PM Test Cases/3. Joget/Joget DX/Move Payment/New TC Create Request
Elapsed time: 51.040s
Test Cases/3. Joget/Joget DX/Move Payment/New TC Create Request FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/3. Joget/Joget DX/Move Payment/New OR Create Request/Page_MOVE PaymentCreate Request/i’
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:74)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:620)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$2.call(Unknown Source)
at New TC Create Request.run(New TC Create Request:48)
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:442)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:433)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:412)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:404)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:281)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:138)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:129)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1645597732783.run(TempTestCase1645597732783.groovy:25)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/3. Joget/Joget DX/Move Payment/New OR Create Request/Page_MOVE PaymentCreate Request/iframe_Memory Used 469 557 MB Datasource A_88868e’ located by ‘//iframe[@id=‘popupSelectFrame_popupselect_726433’]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1434)
at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1423)
at com.kms.katalon.core.webui.common.WebUiCommonHelper.switchToParentFrame(WebUiCommonHelper.java:1445)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:63)
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)
… 17 more
It seems you have an “iframe” issue.
I think so, fyi this is a pop-up