ElementNotInteractableException if Selenium based tests run in parallel with Xvfb

117 views
Skip to first unread message

Michael

unread,
Oct 18, 2023, 7:21:47 AM10/18/23
to robotframework-users
Hi,

I run my (Selenium) tests in Chrome in a parallel (using pabot) with Xvfb as display server - similar to this (via Jenkins with the Xvfb plugin):

xvfb-run pabot --processes 15 --pabotlib --pabotlibport <port> --resourcefile <file> --NoStatusRC -v BROWSER:chrome -v CHROME_BINARY:"<file>" -d test/results --output output.xml tests

My issue is that half of the tests fail either with "ElementNotInteractableException" or with the verification of text. But this only happens in newer Chrome browser versions (v102, v103, v114), but not with the old Chrome v93 browser and also not in Firefox. Furthermore it works fine with the very same command but without Xvfb, e.g. if I employ X11 forwarding or chrome-headless (which I cannot use in general due to other issues).

Does anyone have a suggestion or idea what causes the issue and how to solve it? I'm pretty much stuck...
Anyone else using a similar setup with Jenkins, Xvfb, pabot, Selenium?

I'm using Python 3.7.5 and
  • robotframework                 5.0.1
  • robotframework-pabot           2.7.0
  • robotframework-seleniumlibrary 6.0.0
  • selenium                       4.9.1
Thanks!

Michael

unread,
Nov 7, 2023, 2:23:28 AM11/7/23
to robotframework-users
Anyone else using Xvfb, pabot and Selenium library?
Thanks

extr...@gmail.com

unread,
Nov 7, 2023, 4:29:01 AM11/7/23
to robotframework-users
if you reduce thread count to 5 will it work ? Also Element Not Interactable means that element is present but can be ui disabled , try making sure that its enabled before clicking it

вторник, 7 ноября 2023 г. в 09:23:28 UTC+2, Michael:

Michael

unread,
Nov 7, 2023, 4:56:21 AM11/7/23
to robotframework-users
Reducing the number of threads did not make a difference.
Also, as I pointed out, without Xvfb it all works fine (for instance if I use X11 forwarding to my client PC or chrome-headless mode). Xvfb and Chrome v93 or a recent Firefox browser also works (even with 20 process run in parallel), only newer chrome browsers trigger the issue.

Michael

unread,
Sep 11, 2024, 8:42:47 AM9/11/24
to robotframework-users
Hi all,
I'm still struggling with the described issue and so far could not solve it. I'm still using Chrome v94 in parallel test runs with pabot in a setup with Xvfb. I'd like to use more recent Chrome browser versions, but cannot since then there is this "ElementNotInteractableException" when trying to click elements in dropdowns or extracting text.

Updating did not help, currently I'm using
* robotframework 6.1.1
* robotframework-pabot 2.18.0
* robotframework-seleniumlibrary 6.2.0
* selenium 4.11.2

If anyone has just any idea how to go forward, I'd be quite happy to know.

Thanks,
Michael
On Wednesday, October 18, 2023 at 1:21:47 PM UTC+2 Michael wrote:

Tatu Aalto

unread,
Sep 13, 2024, 9:49:12 AM9/13/24
to michae...@genedata.com, robotframework-users
Hi

There is not single correct answer for your question and therefore solving the problem might be tricky. Generally speaking, the error means that something is obscuring the element and therefore selenium cannot do what you are telling it to do. Perhaps this is a loading problem and you need to ask from the page when it would be ready do interaction (asking is also application specific thing, which you need to ask from your developers). Example something might be rendered over the target element and therefore selenium throws that error. Or perhaps new version of Chrome starts with smaller size and you need make it bigger, so that page is rendered correctly (some might call this a bug in app itself if page size is OK). Also there are numerous other reasons, which could happen and which I can’t imagine.

To know what happens, you need to do detective work and investigate what goes wrong and that might happen. Investigate what you see in the screenshot taken by SL, run your tests with loglevel trace and see in which selenium API calls the error happens. Collect also browser console logs to see what you see in the application side. If you can reproduce the error in a way where you can actually see the execution, pay attention what happens and try to make understand why it happens.

-Tatu


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/f2c67521-523a-4359-a991-192c4eee5ea3n%40googlegroups.com.

Michael

unread,
Sep 16, 2024, 4:52:11 AM9/16/24
to robotframework-users
Thank you Tatu,

but as pointed out earlier, it all works fine when running the tests without Xvfb (for instance with X11 forwarding in my case), or with Xvfb but not in parallel but sequentially. Therefore all "not ready for interaction" issues are ruled out.
There must be an issue with more recent Chrome browsers running in parallel in Xvfb (same btw with Xvnc as Xserver).

Michael

Tatu Aalto

unread,
Sep 16, 2024, 5:11:18 AM9/16/24
to michae...@genedata.com, robotframework-users
Hi

Then I would guess that new Chrome interface with each other and it affects execution. This is pretty normal and most of time people handle this type of problem by isolation. Meaning that one browser is run in one container (container can be Docker, Podman, virtual machine or whatever which provides isolation in desktop level.) This can be big architectural change but is usually good way to go.


-Tatu


Reply all
Reply to author
Forward
0 new messages