Unable to click on object error in linux terminal

I am working on a Linux terminal by accessing the PC on the server through vmware.
I am starting KRE in headless mode without using Internet chrome directly, but I have an Unable to click on object error.
The error contents are as follows
//
click(OverridedMethods.findTestObject(“Object Repository/webTest/menu/header/master/a_region”)): Unable to click on object ‘Object Repository/webTest/menu/header/master/a_region’ (Root cause: com.kms. katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/webTest/menu/header/master/a_region’
//

using the editor
I am using com.kms.katalon.core.webui.chrome (headless).properties modified
{“HEADLESS_DRIVER”:{“args”:["–start-maximized","–window-size=3000,3000","–no-sandbox"]}}

Is there any way to solve the error?

@p_jung,

You can view the latest screenshot to check the page or your element is loaded or not.
Another way is to print the AUT page source to troubleshoot the DOM element:

1 Like

@duyluong Thank you. I solved it by using the browser in headless mode. I would like to set the browser type to chrome instead of headless, is that impossible?

You are successful with a window of large size: 3000x3000. Your target element ‘Object Repository/webTest/menu/header/master/a_region’ is possibly visible somewhere in this large view port.

Please try an experiment. Try to open the viewport in smaller size(e.g. 800x600) so that the target element goes out of the viewport; then I suppose your test will fail even with the headless browser.

How to fix?

Use WebUI.scrollToElement(TestObject) before clicking it. This will slide the viewport to the target element. The element will become visible and clickable.

@duyluong @kazurayam

Thank you for replying.
The way I’ve solved the problem was setting the language in Ubuntu to match the language of the web application using.

I tried with various window-sizes or added scrollToElement, but failed.

But in headless mode,
even after solving the above problem,
not found error occurs in other objects.
And every time I run it, the location where the error occurs is different.

So now , I’m considering running it in normal browser mode.