Friday, 4 August 2017

Code Example - Firefox Untrusted Connection

package com.seleniumWebdriver;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

/**
 * @Blog Name : Selenium Code Example
 * @author Deepak Gupta
 * @Created Date 4-08-2017
 *
 */
public class FirefoxUntrustedConnection {

public static void main(String[] args) {
FirefoxProfile prof = new FirefoxProfile();
prof.setAssumeUntrustedCertificateIssuer(true);
prof.setAcceptUntrustedCertificates(true);

System.setProperty("webdriver.gecko.driver", "./Browser_Driver/geckodriver.exe");
WebDriver driver = new FirefoxDriver(prof);
driver.get("https://www.google.co.in/");

}

}

No comments:

Post a Comment

Code Example - File Download By Robot Class In Firefox Browser

Exported from Notepad++ package com . practiceCode ; import java . awt . AWTException ; import java . awt . Robot ; import j...