Overlapping elements preventing Recaptcha click

200 views
Skip to first unread message

Mike Aleksiuk

unread,
Feb 15, 2017, 10:48:28 PM2/15/17
to Selenium Users
Hello,

I have Selenium tests passing our recaptcha screen when run on the hosted CI tool Snap, but when I try to run them on GoCD they fail with this error:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (129, 38). Other element would receive the click: <div class="rc-anchor-alert">...</div>

The attached screenshot recaptcha_bad.png shows that the rc-anchor-alert div (the red message) is overlapping the checkbox -- this is from the build machine.  This doesn't happen in my actual local browser (see the attached recaptcha_good.png).

I'm not sure why this overlap is happening.  Maybe there are xvfb settings that I could change to prevent this?  I'm using ChromeDriver, Chrome, xvfb, selenium-java, on an EC2 machine running Amazon Linux.

Thanks for any help you can give,
Mike

recaptcha_bad.png
recaptcha_good.png

Andreas Tolfsen

unread,
Feb 16, 2017, 10:30:12 AM2/16/17
to seleniu...@googlegroups.com
Mike Aleksiuk <male...@applauze.com> writes:

> I'm not sure why this overlap is happening.  Maybe there are xvfb
> settings that I could change to prevent this?  I'm using
> ChromeDriver, Chrome, xvfb, selenium-java, on an EC2 machine running
> Amazon Linux.

It looks as if this is due to the bounding box of the text changing
because of different font face and size choices on the Linux
environment.

I am of the conviction that you should configure your WebDriver tests
to bypass recaptcha checks in your test environment, but the safest
alternative would be to remove the red text box using an injected
script.

Mike Aleksiuk

unread,
Feb 16, 2017, 10:59:31 PM2/16/17
to Selenium Users


On Thursday, February 16, 2017 at 7:30:12 AM UTC-8, ato wrote:

It looks as if this is due to the bounding box of the text changing
because of different font face and size choices on the Linux
environment.

Thanks.  I think you're right about the fonts.
 
I am of the conviction that you should configure your WebDriver tests
to bypass recaptcha checks in your test environment, but the safest
alternative would be to remove the red text box using an injected
script.

I don't think I can remove the red text box because it's in an iframe whose src is pointing at a google domain.  I will likely end up doing the bypass.

Cheers,
Mike


 
Reply all
Reply to author
Forward
0 new messages