Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element is not clickable at point - Scroll to click now mandatory? #566

Closed
lindycoder opened this issue Sep 13, 2017 · 14 comments
Closed

Element is not clickable at point - Scroll to click now mandatory? #566

lindycoder opened this issue Sep 13, 2017 · 14 comments

Comments

@lindycoder
Copy link

Meta -

Image(s): selenium/standalone-chrome
Docker-Selenium Image Version(s): 3.5.3
OS: OSX 10.11

Seems that 3.5.3 changed the behavior of clicking an element that you have to scroll down to see.

Code to reproduce (clicking the : "Chat Live Now" at the bottom of the page http://www.internap.com/)

# Python 2.7
# docker==2.5.1
# selenium==3.5.0
# retry==0.9.2

import docker
from retry.api import retry_call
from selenium import webdriver

def test_click_offscreen(version):
    selenium_container = None

    try:
        client = docker.from_env()
        selenium_container = client.containers.run("selenium/standalone-chrome:{}".format(version),
                                                   name="selenium-chrome",
                                                   detach=True,
                                                   ports={'4444/tcp': 31864})

        chrome = retry_call(webdriver.Remote, tries=10, delay=1, fkwargs=dict(
            command_executor="http://0.0.0.0:31864/wd/hub",
            desired_capabilities={
                'platform': 'ANY',
                'browserName': 'chrome',
                'chrome.binary': '/usr/bin/chromium-browser',
                'javascriptEnabled': True,
                'chrome.switches': ["--ignore-certificate-errors"]
            }))

        chrome.get("http://www.internap.com/")

        button = chrome.find_element_by_class_name('chat-web')

        button.click()
        return "GOOD!"
    except Exception as e:
        return "NOPE: {}".format(e)
    finally:
        if selenium_container:
            selenium_container.remove(force=True)


print("TESTING 3.5.2 : " + test_click_offscreen("3.5.2"))
print("TESTING 3.5.3 : " + test_click_offscreen("3.5.3"))

will print

TESTING 3.5.2 : GOOD!
TESTING 3.5.3 : NOPE: Message: unknown error: Element is not clickable at point (81, 3716)
  (Session info: chrome=61.0.3163.79)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 4.9.46-moby x86_64)

Expected Behavior -

If an element is not visible on screen but is visible on the page i would expect the driver to click it anyway.

This behavior is present in 3.5.2

Actual Behavior -

The error Message: unknown error: Element is not clickable at point (81, 3716) is returned.

@jsa34
Copy link
Contributor

jsa34 commented Sep 14, 2017

Same issue occuring here in Chrome debug in 3.5.3. Not had the issue in previous versions.

@tmigliorisi
Copy link

I'm having the same issue as well. Broke a lot of my UI automation scripts for RT... Does anyone know a turnaround? I've tried forcing the scroll but it does nothing.

@derinbay
Copy link

This issue should be fixed when upgrading to chromedriver 2.32, mentioned on 560

Chromedriver bug is here

@tmigliorisi
Copy link

@derinbay thank you! I upgraded the chromedriver after updating browser. Not sure why it didn't pick it up last time. I've just downloaded it again and rebooted my machine. It's working now with selenium 3.5.3.

@lindycoder
Copy link
Author

lindycoder commented Sep 15, 2017

That's great but the problem stays for this version. Since i'm using the remote driver it uses the driver in the docker image.

The docker image selenium/standalone-chrome:3.5.3 derives from selenium/node-chrome:3.5.3 which uses driver 2.31

https://hub.docker.com/r/selenium/node-chrome/~/dockerfile/

...
ARG CHROME_DRIVER_VERSION=2.31
...

So would that mean the 3.5.3 chrome image is not compatible with itself?

@derinbay
Copy link

@lindycoder You're right, You cannot use this image. We're waiting for an updated image as well. I turned back to 3.4.0 image on our systems by the way.

@lindycoder
Copy link
Author

@derinbay cool, for my part 3.5.2 seems fine for my needs

@diemol
Copy link
Member

diemol commented Sep 25, 2017

This was already released with 3.5.3-boron, as mentioned in #560.

Feel free to reopen in case the issue was not solved.

@osvalban
Copy link

I am still seeing this problem even after upgrading to 2.34. Note that my project requires the use of PyVirtualDisplay.

Environment:
chrome=63.0.3239.108
Driver info: chromedriver=2.34.522913
ubuntu 16.04 LTS
Python 3.6.3
PyVirtualDisplay (0.2.1)

Traceback (most recent call last): <snip> selenium.common.exceptions.WebDriverException: Message: unknown error: Element <button aria-label="... opens pop up" class="actionable actionable_button actionable_full-width actionable_large-button actionable_no-outline actionable_prefix actionable_secondary-dark-affix" type="button" data-a=" ... ">...</button> **is not clickable at point (494, 436). Other element would receive the click:** <h2 class=" ... " id="heading-11">...</h2> (Session info: chrome=63.0.3239.108) (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.10.0-42-generic x86_64)

@qw34ty
Copy link

qw34ty commented Dec 24, 2017

Hey i have this issue too, but in my case some shitty overlay comes up, i put this in as workaround, but when i run headless throws the erro.

> time.sleep(10) pyautogui.press('esc') #escape overlay time.sleep(3)

@qw34ty
Copy link

qw34ty commented Dec 24, 2017

headless,
^[('element not visible\n (Session info: headless chrome=63.0.3239.108)\n (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.13.0-21-generic x86_64)', None, None)

@vibmish
Copy link

vibmish commented Aug 17, 2018

I am getting the same issue for one image element, is not clickable at point (106, 349). Other element would receive the click:
(Session info: chrome=69.0.3497.42)
(Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.11.6 x86_64)

@lindycoder
Copy link
Author

lindycoder commented Aug 17, 2018

@vibmish

I've had a problem like this where a checkbox is kind of underneath a that was made wider by css... although the checkbox is visible, there is in face an element above this.

For with fixed it by sending a "space" keypress to the checkbox and we found that only we only had the problem on chrome.

So maybe you could try with a firefox selenium container see if you get the same problem

EDIT: By the way I don't think this problem is related to the scrolling issue

@vibmish
Copy link

vibmish commented Aug 17, 2018

@lindycoder ok thanks

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants