本文介绍了ChromeDriver已开始创建空白屏幕截图吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ChromeDriver创建自动浏览器测试.今天,它停止了工作,看看保存在数据库中的屏幕快照,它们都是空白像素.

I am using ChromeDriver to create automated browser tests. This stopped working today, taking a look at the screenshots that are saved in the database, they are all blank pixels.

为什么?

ChromeDriver 2.29.0

ChromeDriver 2.29.0

foreach (var testStep in testSteps.ToList())
{
    var testStepRun = new TestStepRun();
    repo.createTestStepRun(testStepRun);

    /* I omit this function in my posting but will include it if needed */
    RunTestStep(testStep);

    try
    {
        testStepRun.ScreenshotPNG = driver.GetScreenshot().AsByteArray;
    }
    catch(UnhandledAlertException)
    {
    }

    repo.SaveChanges();
}

推荐答案

它与您的Chrome浏览器有关.降级至版本58: https://www.slimjet.com/chrome/google-chrome-old-version.php

It's related to your Chrome browser.Downgrade to version 58: https://www.slimjet.com/chrome/google-chrome-old-version.php

这篇关于ChromeDriver已开始创建空白屏幕截图吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 04:44