0

I am trying to handle the following issue while trying to automate login process with JMeter WebDriver Sampler to our web app, which requests an authoriaztion certificate for a user to log in. After filling credentials and clicking the Login button, the following window is called: dialog window. I assume this is an OS window that cant be aimed by Selenium/WebDriver Sampler script - or is it possilbe? EDIT: I found some solution e.g. https://sqa.stackexchange.com/questions/7640/how-to-select-security-certificate-from-security-dialog bit I am kind of afraid of implement the recommended code to the script - isnt there another solution then via Selenium script?

I tried to set a certificate in jmeter's system.properties file: system.properties keystore setting. I supposed it makes SOMETHING, e.g. some error after launching script, but it ends on the exactly same step - dialog window with Certificate choosing offer. So I assume this is wrong place to set user authentication certificate. How is it possible to handle this kind of login process? I guess it is necessary to set a default certificate that is paired with the user's credentials I am sending in the previous step in my script, but I dont know where.

akcenurt
  • 13
  • 3

1 Answers1

0

What you set in JMeter's "system.properties" file only affects the client certificates for HTTP Request samplers.

WebDriver Sampler is a different beast, it uses Selenium libraries to automate the real browser hence you need to follow your browser documentation to learn how to automate the certificate selection process.

For example for

More information: AutoSelectCertificateForUrls

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I really appreciate your answers, Dmitri, they always direct me towards some new point of view, thank you! – akcenurt Feb 13 '23 at 07:38
  • I resolved the issue with this (it is basically Dmitri's solution but with more details: https://stackoverflow.com/questions/70835911/web-automation-login-with-certificate-chrome-python ). It perfectly works, when I launch my script in Jmeter GUI with default ChromeDriverConfig setting (so in tab Driver all is unchecked), but when I try to launch my script in headless mode without launching Chrome gui (so in ChromeDriverConfig in Driver tab "Headless" is checked) my script fails on the same step. When it is headless, it is not able to choose certificate automatically. Is there some solution? – akcenurt Feb 13 '23 at 11:07