Headless Chrome is capturing only white screenshot for intranet sites.
Reported by
snpanigr...@gmail.com,
Sep 20 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 Example URL: https://pfo-18422.dev.upoint.hewitt.com/web/hmorg/client-tooling-login Steps to reproduce the problem: 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.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.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"); ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--headless"); chromeOptions.addArguments("window-size=1280,1696"); WebDriver driver = new ChromeDriver(chromeOptions); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); driver.get("https://pfo-18422.dev.upoint.hewitt.com/web/hmorg/client-tooling-login"); Thread.sleep(10000); System.out.println(driver.getTitle()); File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(screenshotFile, new File("C:\\Users\\A0705286\\Desktop\\ScreenShot\\first.bmp")); What is the expected behavior? It should capture the page screenshot exactly same as it appears. What went wrong? It is capturing only white screenshot. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 61.0.3163.91 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: I was automating my company's internal site with headless chrome. But it is not capturing screenshot properly. Same code is working fine with headless firefox and chrome regular mode.
,
Sep 22 2017
,
Oct 2 2017
This sounds like it could be related to headless not handling properly a network cert error (e.g., https://bugs.chromium.org/p/chromium/issues/detail?id=757181) Could you indicate if you are getting any errors in the console?
,
Oct 2 2017
,
Oct 3 2017
In console, its not displaying any error. same code is working fine with headless firefox.
,
Oct 3 2017
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 3 2017
can you add --enable-logging and perhaps --v=99 as arguments I'm trying to see if there's any SSL or certificate error being logged
,
Oct 3 2017
hii Dvallet As per your suggestion,i added those arguments. Now getting below logs. Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a) on port 48798 Only local connections are allowed. log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Oct 03, 2017 11:01:33 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS 401 - Unauthorized: Access is denied due to invalid credentials.
,
Oct 3 2017
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 3 2017
Hi Actually that logs are coming for another URL. After adding those flags still its not displaying any logs.
,
Oct 3 2017
Thanks for digging into it. I still feel like it could be this issue: https://crbug.com/741872 , but please let me know if you feel that's not the case
,
Oct 3 2017
Hi Thanks for your quick reply.. I am not sure.But that may be the cause.. Let's check after that issue got fixed.
,
Oct 10 2017
,
Oct 11 2017
Unable to triage this issue from TE end, since it is related to selenium automation tool, hence adding TE-NeedsTriageHelp for further triage.
,
Oct 11
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by kochi@chromium.org
, Sep 20 2017