Can't click on Windows Forms Ribbon Button?

Hello,

We are currently evaluating if Katalon Studio 7.7.6 is a suitable testing solution for a business partner of ours.

For that we are testing a Windows Forms Application on a Windows 10 machine. However since 2 days we stuck at clicking a simple button from within a collapsable Windows ribbon (See screenshot)

We can record all elements and the button itself using the Windows Recorder but we get an error message at playback (See at the end of the post) .

Further information:

-) The ribbon only appears, after you press the “start” tab at the top.
-) Sometimes when we try to reccord the button within the ribbon it is not possible at all and elements behind the ribbon get selected instead.
-) We also tried remote testing with the same playback error result.
-) We are using a trial version of Katalon Enterprise at the moment.

Any help is very welcome since we cannot recommend this software to our customer if we can’t fix this annoying issue.

Greetings, Stephan

Picture with ribbon collapsed:

Picture with button to press within ribbon:

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.WebDriverException: An element command could not be completed because the element is not pointer- or keyboard interactable. (WARNING: The server did not provide any stacktrace information)

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshoot-common-execution-exceptions-web-test.html

09-22-2020 03:17:57 PM Test Cases/New Test Case

Elapsed time: 1m - 42.447s

Test Cases/New Test Case FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: An element command could not be completed because the element is not pointer- or keyboard interactable. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘DESKTOP-6E43T1N’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {appTopLevelWindow: 71a48, javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS}
Session ID: 3B215628-AB18-4C46-801C-E33EE8E638F8 (Root cause: org.openqa.selenium.WebDriverException: An element command could not be completed because the element is not pointer- or keyboard interactable. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘DESKTOP-6E43T1N’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {appTopLevelWindow: 71a48, javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS}
Session ID: 3B215628-AB18-4C46-801C-E33EE8E638F8
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper.click(WindowsActionHelper.java:255)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$click$3.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:43)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:77)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:37)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$click.callCurrent(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:33)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords.click(WindowsBuiltinKeywords.java:72)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords$click$1.call(Unknown Source)
at New Test Case.run(New Test Case:26)
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:339)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
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 TempTestCase1600780671615.run(TempTestCase1600780671615.groovy:25)
)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:79)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:37)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$click.callCurrent(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:33)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords.click(WindowsBuiltinKeywords.java:72)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords$click$1.call(Unknown Source)
at New Test Case.run(New Test Case:26)
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:339)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
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 TempTestCase1600780671615.run(TempTestCase1600780671615.groovy:25)
Caused by: org.openqa.selenium.WebDriverException: An element command could not be completed because the element is not pointer- or keyboard interactable. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘DESKTOP-6E43T1N’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {appTopLevelWindow: 71a48, javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS}
Session ID: 3B215628-AB18-4C46-801C-E33EE8E638F8
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper.click(WindowsActionHelper.java:255)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$click$3.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:43)
at com.kms.katalon.core.windows.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:77)
… 19 more

Hi @stephan.pillhofer,

As the information you provided. I saw there is an exception caused by “the element is not pointer- or keyboard interactable”. This often caused by clicking on a wrong element. So you have to check again the element’s locator or try another locator strategy.

More specifically, I would suggest you use name-based locator instead of the default xpath.
image

~ Hope it could help! /=)

1 Like

And maybe you should take a look at Native Windows Recorder as it has some more advantages over the old one. /=)

image

1 Like

Hello, thank you for your answer.

Regarding native recorder: It is not abe to capture the elements within the ribbon, it just selects it as a whole:

As a side note: Using the standard windows recorder the capture of the elements inside the ribbon does also not work properly. We were only able to capture the desired button after pinning the ribbon (so that it won’t vanish when we click somewhere else) and then refreshing the screen within the record utility.

Problem is: The button to pin the ribbon (it is visible on the top right inside the picture) is also not capturable.

When we try to replay the recorded actions (without the pinning of the ribbon because this is not possible) then the error as described in the orginal post happens.

The locator strategy is already name and not xpath.

Hi @stephan.pillhofer,

Did the ribbon show up when you playback the recorded actions? Could you share the video recording of your execution so that I can understand more about your issue /=)

1 Like

I will send it to you as a private message

Ok, Thanks /=)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.