How to Handle SSL Certificate in Selenium WebDriver


How to Handle SSL Certificate in Selenium WebDriver


In this article, we will learn how to handle an untrusted SSL certificate using selenium webdriver.

But Before that,

What is an Untrusted SSL Certificate?

A lot of time you might have observed whenever we tried to access any web page we face message SSL certificates like below in the case of Chrome.






In the case of IE
Similarly In the case of Firefox


There could be many possible reasons for this message like certificate is expired or certificate does not belong to this web page etc.




To handle this certificate issue in any web browser we need to make use of DesiredCapabilities class and then Set ACCEPT_SSL_CERTS variable equals to true.

Below is the code snapshot to handle this in case of Chrome.



Below is the code snapshot to handle this in case of Internet Explorer



Below is the code snapshot to handle this in case of Safari browser.



To handle this error in case of firefox we first, need to create a Firefox profile and then setAcceptUntrustedCertificates as true.

Below is the code snapshot to handle this in the case of Firefox.






SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
September 12, 2019 at 9:26 PM

Hi, can we acheive this in headless browser.

Reply
avatar
September 13, 2019 at 1:53 PM

Hi vaibhav, yes it will work.You need to add code for headless which is also Avilable in this website

Reply
avatar
November 26, 2021 at 2:33 PM

I absolutely agree with the above. In addition, I would encourage using a service like chihuahua puppies for sale, teacup chihuahua for sale, sphynx cats sale, sphynx kittens for sale

Reply
avatar
Anonymous
February 7, 2022 at 4:10 AM

The dachshund was bred in Germany hundreds of years ago to hunt badgers. https://www.poodlespring.com/ "Dach" means badger and "hund" means dog. The three varieties of dachshund, smooth-, Dachshund puppies for sale wire-,and long-coated, originated at different times. The smooth was the first and arose from a mixture of a miniature French pointer and a pinscher. The breed also comes in two sizes: standard and miniature, with the standard the original size.
The dachshund has short, strong legs that enable the dog to dig out prey and go inside burrows. Larger versions of the breed were used to chase deer or fox. Smaller dachshunds Dachshund puppy for sale were bred for hunting hares and ferrets.
The breed is still used for hunting, primarily in Europe, nine in dachshunds puppies for sale ches in height.All three types are known
The dachshund's coat may be shades of red, black, chocolate, white or gray. Some have tan markings or are spotted or dappled. Dachshunds live about 12 to 15 years. toy poodle for sale espite their size, dachshunds are known for their courageous nature and will take on animals much larger than themselves. Some may be aggressive toward strangers and other dogs.
As family dogs, dachshunds are loyal companions and good watchdogs.
https://Greenlandpuppies.com They are good with children if treated well. They can be slightly difficult to train.
Some dachshund fanciers say there are personality differences among the different varieties of the breed. For instance, the long-coat dachshund is reportedly calmer teacup poodles for sale than the smooth-coat variety,

Reply
avatar
March 23, 2022 at 10:55 AM




https://www.myppuphouse.com/
https://www.yorkiespuppiessale.com/
https://www.myppuphouse.com/teacup-maltese-puppies-for-sale/
https://www.myppuphouse.com/teacup-maltipoo-puppies-for-sale/
https://www.myppuphouse.com/teacup-pomeranian-puppies-for-sale/
https://www.myppuphouse.com/teacup-poodle-puppies-for-sale/
https://www.myppuphouse.com/teacup-shih-tzu-puppies-for-sale/
https://www.myppuphouse.com/teacup-yorkie-for-sale/
https://www.newdaypuppies.com/


Reply
avatar
May 25, 2022 at 4:48 PM

Wonderful, I really enjoyed your article. I bookmarked your website. Kenyaevisa is a necessary travel permit, which the government of Kenya grants to foreigners wishing to visit Kenya.


Reply
avatar
May 30, 2022 at 3:44 PM

Wow, it is a helpful post. Thankyou Mr. I hope that you will definitely share that type of information with us . apply for Vietnam evisa is not a hurdle. When the online system has upgraded and improved itself.

Reply
avatar
May 31, 2022 at 2:24 PM

Thanks author, for such an informative blog😊😊😊😊😊Sometimes travelers get overwhelmed by the complicated procedures of visa acquisition. However, getting e-visa to Turkey from Indian is as easy as making a paper plane : ) Apply Turkey e-visa from India with the online portal and get your e-visa in 3 steps! And pay your Turkey visa cost online.

Reply
avatar
Max
July 18, 2022 at 12:51 PM

Great, your articles are really very informative and easy to understand. Thanks for this special article. India entry visa . India entry visa is a way to apply for an India visa without meeting any embassy.


Reply
avatar
November 17, 2023 at 1:02 PM

The seamless fusion of informative content and captivating narratives in your blog sets it apart. Your unique perspective enriches the understanding of the topic, making each post a valuable resource. The evident passion and expertise shine through, creating an engaging reading experience. I eagerly anticipate more thought-provoking insights and commend you on your exceptional work.

Reply
avatar