Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless chrome is not working secured intranet sites. #9

Open
snpanigrahi9 opened this issue Oct 27, 2017 · 1 comment
Open

Headless chrome is not working secured intranet sites. #9

snpanigrahi9 opened this issue Oct 27, 2017 · 1 comment
Assignees

Comments

@snpanigrahi9
Copy link

chrome version 62.0.3202.62
chrome driver 2.33
Platform Windows 7

Step to reproduce

package demo1;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;

import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Keys;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class Headless {

public static void main(String[] args) throws InterruptedException, IOException
{ 
	
	System.setProperty("webdriver.chrome.driver", "C:\\MyWorkspace\\Demo\\chromedriver.exe");
	DesiredCapabilities caps = DesiredCapabilities.chrome();
	caps.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
	caps.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
	ChromeOptions chromeOptions = new ChromeOptions();
	chromeOptions.addArguments("--headless");
	chromeOptions.addArguments("--enable-logging");
	chromeOptions.addArguments("--v=99");
	//chromeOptions.addArguments("window-size=1280,1696");
	caps.setCapability(ChromeOptions.CAPABILITY, chromeOptions );
	WebDriver driver = new ChromeDriver(caps);
	
	driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
	//driver.get("https://pfo-18422.dev.upoint.hewitt.com/web/hmorg/client-tooling-login");
	driver.get("https://newcointranet.com/");
	//driver.get("http://ukvmgdev117.uk.aon.bz:9089/navigator/?desktop=UKN");
	driver.manage().window().setSize(new Dimension(1280,1696));
	Thread.sleep(10000);
	String st = driver.getTitle();
	System.out.println(st);
	
	
	File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
	FileUtils.copyFile(screenshotFile, new File("C:\\Users\\A0705286\\Desktop\\ScreenShot\\first.bmp"));



    
	} 		
}
@ldaume ldaume self-assigned this Oct 27, 2017
@ldaume
Copy link
Owner

ldaume commented Dec 4, 2017

Sorry for this late answer. It looks like it is a problem in the headless chrome. Issue is already available at https://bugs.chromium.org/p/chromium/issues/detail?id=721739 ;)

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

No branches or pull requests

2 participants