Unable to record radio button

Hello everyone, I would like to ask how to solve this exception. I would like to record radio button in my testcase. When I run my testcase, I get this error. Please kindly check and reply to me. Thank you.

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element
is not clickable at point (454, 153). Other element would receive the click:

07-08-2020 01:24:37 PM Test Cases/NewManaulTimeClock(AllEmployees)

Elapsed time: 24.891s

Test Cases/NewManaulTimeClock(AllEmployees) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/NewManaulTimeClock(AllEmployees)/Page_HRMS/div_My Direct Reports_mat-radio-outer-circle’
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:76)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:43)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
at NewManaulTimeClock(AllEmployees).run(NewManaulTimeClock(AllEmployees):46)
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 TempTestCase1594191271295.run(TempTestCase1594191271295.groovy:25)
Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element

is not clickable at point (454, 153). Other element would receive the click:

(Session info: chrome=83.0.4103.116)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘DESKTOP-155UPUB’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 83.0.4103.116, chrome: {chromedriverVersion: 83.0.4103.39 (ccbf011cb2d2b…, userDataDir: C:\Users\MYOE\AppData\Local…}, goog:chromeOptions: {debuggerAddress: localhost:65168}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
Session ID: e698d1d958a79818336c4442f4315bb9
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
at com.sun.proxy.$Proxy9.click(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:69)
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

You need to use check not the click to select the radio button.
Like this:
WebUI.uncheck(findTestObject(‘Page_Top_Bar/input_Configure Right Inbox_smartAttachmentsCheck’))

1 Like

@myoethandarkyaw2018 Can we see the HTML of the two radio buttons as well as the definition you have of the div_All Employees element? I assume that is the element you are investigating? It looks like you have it as a div but I figure it should be an input.

1 Like

Thank you for your reply. I will test it again.

Thank you for your suggestions. I will check it in HTML and test it again.

You can try to capture the xpath/CSS by yourself. Most of the time the Radio buttons will have nearly identical attribute. One way to fix that is to use the neighbor elements of that radio button.

e.g. //input[@class=‘radio’]/following::span[text()=‘Radio 1’]

1 Like

Hello @thaiFromKatalon @grylion54, I would like to ask about that when I capture the object for radio button using Object Spy, it display “div_In_mat-radio-inner-circle” instead of “//input[@class=‘radio’]/following::span[text()=‘Radio 1’]” at Object Name in Spy view. Please kindly check and reply to me. What should I do? Thank you.

@myoethandarkyaw2018 It depends where you “test” for the element that you capture with the Object Spy. As an example in the picture above you have Out highlighted, and you have a div element. However, I “test” only the actual circle of the radio button–it’s in red in the picture above. That is the actual input element. Try to “test” with the Object Spy just the radio button in red and check if it is an input element. :slight_smile:

Hello @grylion54
Good day, I have been tested again for the radio button in red and check if it is an input element, it display “div_In_mat-radio-inner-circle”. What should I do? If you have time, please kindly check and reply to me. Thank you so much.

You have to review the HTML code at this time. If you are using Chrome, hit F12. This will bring up the code window. Then right click on the Out element and select Inspect. Now the code window should display the elements around the Out element.

1 Like

Thank you for your reply. I will test it again.