question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenQA.Selenium.WebDriverException: 'An element command could not be completed because the element is not pointer- or keyboard interactable.'

See original GitHub issue

We have a complex application that is being automated. In this given scenario, we have a WPF app with a listview and a couple of items in the list. First time into the page, the element with an automation id can be found.

Second time in results in the above error.

The element can be found, however Displayed = false. and the rect position is incorrect (wrong values and 0 for width and height).

Restarting WinAppDriver gives the same problem. Inspect.exe shows the correct values. Visual Studio Live Visual Tree shows the correct values (Automation Properties IsOffScreen = false, etc…)

PageSource snippets:

                    <ListItem AcceleratorKey="" AccessKey="" AutomationId="NewProductItem" FrameworkId="WPF" HasKeyboardFocus="False" IsContentElement="True" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="False" IsOffscreen="False" LocalizedControlType="list item" Name="" Orientation="None" ProcessId="5636" RuntimeId="7.5636.43273738" x="62" y="92" width="243" height="98">


                    <ListItem AcceleratorKey="" AccessKey="" AutomationId="NewProductItem" FrameworkId="WPF" HasKeyboardFocus="False" IsContentElement="True" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="False" IsOffscreen="True" LocalizedControlType="list item" Name="" Orientation="None" ProcessId="5636" RuntimeId="7.5636.43273738" x="-567" y="-295" width="0" height="0">

WPF app 4.6.1. WinAppDriver 1.1.1809.18001 AppiumWebDriver 4.1.1

Cheers

John

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
benzionyungercommented, Feb 15, 2021

I just had the same issue. I recently upgraded from Dev Express v20.1 to v20.2, and in the older version a DevExpress.XtraBars.Ribbon.RibbonStatusBar (and child elements) had attribute “isOffScreen=False”, in the newer version the value was True. WinAppDriver cannot interact with the element in this state and throws the error mentioned in this issue header. I opened a bug ticket with Dev Express and meanwhile they reproduced the issue and confirmed the bug. Meanwhile use their project converter to change the references to an earlier version to avoid this error.

1reaction
naeemakramcommented, Aug 5, 2020

Hi John, I have noticed that objects of ListItem have a “displayed” set to false if they’re not being displayed on the screen. Maybe you could press the down arrow key in a for loop until the item you need is displayed or you’ve been through all list items.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when attempting .Click() - 'An element command ...
Error when attempting .Click() - 'An element command could not be completed because the element is not pointer- or keyboard interactable'.
Read more >
An element command couldn't be completed because the ...
An element command couldn't be completed because the element is not a pointer - or keyboard interactable #973.
Read more >
selenium-webdriver/lib/error.ElementNotInteractableError
Indicates a command could not be completed because the target element is not pointer or keyboard interactable. This will often occur if an...
Read more >
How to resolve this error Element not interactable Any solution
Element is not reachable by keyboard in plain words means that the element can't be reached using the keyboard, which means you won't...
Read more >
How To Deal With "Element is not clickable at point” ...
The exception “Element is not clickable at point” might be thrown when the element is not under focus or the action is being...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found