SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.86k stars 2.51k forks source link

[πŸ› Bug]: MyElement.Click Results in ElementNotInteractableException Error for Firefox #2159

Open mikejohnstonPremierinc opened 6 months ago

mikejohnstonPremierinc commented 6 months ago

What happened?

Whenever I try to click an element that is slightly out of the viewport, Firefox throws:

Message:  OpenQA.Selenium.ElementNotInteractableException : Element <option> could not be scrolled into view

If I add code to scroll to the element first, then click the element, it works in Firefox

It works fine works in Chrome and Edge without needing to scroll first.

The same test with Firefox works fine on a Windows (Non-docker) grid, as well as works fine locally, without having to scroll first.

Command used to start Selenium Grid with Docker (or Kubernetes)

version: "3"
services:
  node-docker:
    image: selenium/node-docker:4.17.0
    volumes:
      - /share/pqafiles/assets:/opt/selenium/assets
      - /share/pqafiles/config/toml_server1.toml:/opt/bin/config.toml
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - selenium-hub # Not sure this is needed in a dynamic grid either
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443      
      - SE_VNC_NO_PASSWORD=1
      - SE_OPTS=--session-timeout 297 --enable-managed-downloads true

  selenium-hub:
    image: selenium/hub:4.17
    #Prior version used: selenium/node-docker:4.14.1
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"    

// toml_server1.toml
[docker]
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
# start a container with the given image.
configs = [
    "selenium/standalone-firefox", "{\"browserName\": \"firefox\"}",
    "selenium/standalone-chrome", "{\"browserName\": \"chrome\"}",
    "selenium/standalone-edge", "{\"browserName\": \"MicrosoftEdge\"}"
    ]

# URL for connecting to the docker daemon
# Most simple approach, leave it as http://127.0.0.1:2375, and mount /var/run/docker.sock.
# 127.0.0.1 is used because interally the container uses socat when /var/run/docker.sock is mounted 
# If var/run/docker.sock is not mounted: 
# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http://host.docker.internal:2375.
# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock,
# then use http://host.docker.internal:2375.
# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue.
url = "http://127.0.0.1:2375"
# Docker image used for video recording
video-image = "selenium/video:ffmpeg-4.3.1-20231016"

# Uncomment the following section if you are running the node on a separate VM
# Fill out the placeholders with appropriate values
# [server]
# host = <ip-from-node-machine>
# port = <port-from-node-machine>

Relevant log output

Message: 
OpenQA.Selenium.ElementNotInteractableException : Element <option> could not be scrolled into view

Operating System

Linux Red Hat 9 Rhel 9

Docker Selenium version (image tag)

node-docker:4.17.0

Selenium Grid chart version (chart version)

No response

github-actions[bot] commented 6 months ago

@mikejohnstonPremierinc, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 6 months ago

Does this happen on the latest version of the image?

mikejohnstonPremierinc commented 6 months ago

Does this happen on the latest version of the image?

Yes it does

diemol commented 6 months ago

Please share the test we can use to reproduce the issue.