Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

getting error "This Connection is Untrusted" after accessing the protected page when I run code of x509 cert automation using java,how can automate it

  • 1 ответ
  • 1 имеет эту проблему
  • 12 просмотров
  • Последний ответ от ashwini_patange

more options

I have automated feature of x509 authentication, in that I have imported my cert file in firefox using java. After accessing the protected page, I get this error "This Connection is Untrusted". By clicking on "I understand the risk" and by confirming the certificate MANUALLY, I am able to proceed, however I want to automate this part(i.e. clicking on "I understand the risk" and confirming the cert) Is there any way to bypass this error and directly display the imported certificates using java?

I have automated feature of x509 authentication, in that I have imported my cert file in firefox using java. After accessing the protected page, I get this error "This Connection is Untrusted". By clicking on "I understand the risk" and by confirming the certificate MANUALLY, I am able to proceed, however I want to automate this part(i.e. clicking on "I understand the risk" and confirming the cert) Is there any way to bypass this error and directly display the imported certificates using java?

Выбранное решение

Hi Team, it worked with following code... thanks... please close the discussion.

File file = new File(firefoxProfileDir); FirefoxProfile profile = new FirefoxProfile(file); profile.setAcceptUntrustedCertificates(true);

WebDriver driver; if (!FIREFOX_PATH.equals("")) {

File binaryFile = new File(FIREFOX_PATH); FirefoxBinary firefoxBinary = new FirefoxBinary(binaryFile); driver = new FirefoxDriver(firefoxBinary, profile); } else { driver = new FirefoxDriver(profile); }

Прочитайте этот ответ в контексте 👍 0

Все ответы (1)

more options

Выбранное решение

Hi Team, it worked with following code... thanks... please close the discussion.

File file = new File(firefoxProfileDir); FirefoxProfile profile = new FirefoxProfile(file); profile.setAcceptUntrustedCertificates(true);

WebDriver driver; if (!FIREFOX_PATH.equals("")) {

File binaryFile = new File(FIREFOX_PATH); FirefoxBinary firefoxBinary = new FirefoxBinary(binaryFile); driver = new FirefoxDriver(firefoxBinary, profile); } else { driver = new FirefoxDriver(profile); }