Selenium step for "Click Element" fails when the element is out of screen in the browser.

Document ID : KB000007549
Last Modified Date : 14/02/2018
Show Technical Document Details

When I tried to execute Selenium integration test cases, I sometimes encountered the error message in the Selenium step for "Click Element" action like below:
| Error executing Selenium Step :
[{"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"<Element Xpath>"}}]
| Step:        ClickElement
| Message:     {"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"<Element Xpath>"}} failed.
| Trapped Exception: {"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"<Element Xpath>"}} failed.
| Trapped Message:   java.lang.RuntimeException: {"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"<Element Xpath>"}} failed.
java.lang.RuntimeException: {"negated":false,"type":"clickElement","locator":{"type":"xpath","value":"<Element Xpath>"}} failed.
    at com.sebuilder.interpreter.TestRun.executeStep(
    at com.itko.lisa.test.TestNode.executeNode(
    at com.itko.lisa.test.TestCase.execute(
    at com.itko.lisa.test.TestCase.execute(
    at com.itko.lisa.test.TestCase.executeNextNode(
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(
    at com.itko.lisa.editor.WalkThruPanel.access$900(
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(
    at com.itko.util.swing.panels.ProcessingDialog$
    at Source)
Caused by: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
Command duration or timeout: 568 milliseconds

DevTest 9.1, 9.5, 9.5.1, 10.0.0 and 10.1.0

This is a known problem in Selenium Integration test cases when the element to be clicked exists but that element is not visible in the browser.


To maximize the browser before clicking the element sometimes can solve the problem but sometimes cannot solve the problem. That is depended on the size and the layout of the page which includes the element to be clicked.

Please contact CA Support and open a case to handle this problem to get the solution. CA support will deliver the patch for this problem. The feature of the patch focuses to the element before clicking it.