Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
286 views
by Contributing Tester (66 points)
edited by
Am automating one of the client requirement and there am facing a problem like during the authentication process always displays the captcha to choose an image for verification. But I don't know how to avoid asking captcha and had an idea like if we authenticate via Proxy we can restrict captcha. So I have used below code to hook up the Proxy in Selenium but that's also not working, Still, the authentication asks captcha. So please anyone help me with this. Thanks in advance.

String PROXY = "xxxxxxxx:xxxx";

            org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
            proxy.setHttpProxy(PROXY)
                 .setFtpProxy(PROXY)
                 .setSslProxy(PROXY);
            DesiredCapabilities cap = new DesiredCapabilities();
            cap.setCapability(CapabilityType.PROXY, proxy);
            driver = new ChromeDriver(cap);

1 Answer

0 like 0 dislike
by Master (1.2k points)
selected by
 
Best answer
Usually using proxy does not mean avoiding captcha..

 

To avoid captcha, we usually work with the developer team and ask them to remove captcha when we access application from specific IP/using specific key in the URL like www.example.com/urlpath.html?avoidcaptchakey=****

Also, if you are running on Test Environment or stagging environemnt, you can ask developer to read the environment and avoid the captcha.

Hope that helps.
by Contributing Tester (66 points)
Thank you @mayur.  Any possibility to handle captcha(verify with image) by integrating any third-party library since we know no support in selenium.
by Master (1.2k points)
We have tried using OCR libraries. But, again it does not work all the time and not a good solution.

As the sole purpose of captcha is to prevent automation.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...