Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Wheile trying to integrate with selenium i am getting error as Your connection is not private ...... NET::ERR_CERT_AUTHORITY_INVALID #300

Open
Navakanthtunga opened this issue Aug 14, 2020 · 1 comment

Comments

@Navakanthtunga
Copy link

Description
While trying to integrate and run with selenium unfortunately I am getting the error as "Your connection is not private
Attackers might be trying to steal your information from www.google.com (for example, passwords, messages or credit cards). Learn more
NET::ERR_CERT_AUTHORITY_INVALID"

Code used
public class CaptureLogs {

public String sFileName = "D://SeleniumEasy.har";

@Test
public void test1() {
	// start the proxy
	BrowserUpProxy proxy = new BrowserUpProxyServer();
	proxy.start();
	Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);
	DesiredCapabilities capabilities = new DesiredCapabilities();
		capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);

// capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

	capabilities.acceptInsecureCerts();
	
	System.setProperty("webdriver.chrome.driver",
			"D:\\old projects\\practice\\src\\main\\resources\\exe files\\chromedriver.exe");
	WebDriver driver = new ChromeDriver(capabilities);
	proxy.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT);
	// create a new HAR with the label "yahoo.com"
	proxy.newHar("Google.com");
	driver.get("https://www.google.com/");
	Har har = proxy.getHar();
	File harFile = new File(sFileName);

	try {
		harFile.createNewFile();
		har.writeTo(harFile);
		System.out.println(har.toString());
	} catch (IOException ex) {
		System.out.println(ex.toString());
		System.out.println("Could not find file " + sFileName);
	}
	try {
		Thread.sleep(5000);
	} catch (InterruptedException e) {
		e.printStackTrace();
	}
}

}

Expected behavior
URL should be launched successfully.

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Windows
  • Chrome
  • Version [84]

Proxy Issue

Additional context
If I am running without proxy I am able to launch the URL suc

@ghalkouski
Copy link

@Navakanthtunga Did you resolve this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants