Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated testing with Smart Card authentication (selenium or other option?)

We host hundreds of websites with smart card authentication (CAC authentication for those with DoD experience). I need to build automated tests for these sites. In regular industry, I have used Selenium for end-to-end testing suites, but these websites I must test require smart card authentication.

When a user visits a site, the browser pops-up a window asking which certificate from the smart card to use. This pop-up will prevent me from automating clicks within the DOM, right? Is there a best practice to get around it?

like image 993
davidhaskins Avatar asked Nov 27 '25 11:11

davidhaskins


1 Answers

With the recent releases of each Selenium Client handling of pop-ups have become much easier. Using Selenium, you can deal easily with the following kinds of pop-ups:

  • Basic Authentication popup (Windows)

  • Modal popup (HTML DOM 🌲)

  • Alert (JavaScript)

As far as Certificates are concerned we can easily handle them through separate Profiles.

like image 80
undetected Selenium Avatar answered Nov 30 '25 02:11

undetected Selenium



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!