【问题标题】:Getting org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 10.000获取 org.openqa.selenium.TimeoutException:超时:从渲染器接收消息超时:10.000
【发布时间】:2020-09-22 06:42:55
【问题描述】:

获取 org.openqa.selenium.TimeoutException:超时:从渲染器接收消息超时:10.000 使用适用于 Windows 的 Chrome 85.0.4183.121 刚刚将 chrome 自动从 102 更新到 121,并且出现了这个问题。日志看起来像是在截屏时发生的(使用 org.openqa.selenium.TakesScreenshot)。 chrome 浏览器 121 版本是否有问题,因为他们的发行说明 (https://chromereleases.googleblog.com/) 确实提到他们已尝试解决 121 版本的越界存储问题,但它与 selenium 的集成可能存在问题?

【问题讨论】:

  • 121 构建你使用的 chrome 浏览器没有问题?你能通过编辑问题分享你的 taki 截图类
  • @JustinLambert 我正在使用 chrome 浏览器版本:85.0.4183.121 和 chromeDriver 版本:85.0.4183.87。我也在使用 org.openqa.selenium.TakesScreenshot。
  • 下面的截图代码,你应该在这里添加你尝试什么以及通过共享代码sn-p和all得到什么错误
  • 我偶尔会看到类似的东西,但它似乎与“点击”等 UI 操作有关。 org.openqa.selenium.TimeoutException: timeout: Timed out received message from renderer: 300.000 (Session info: chrome=88.0.4324.192) 我不认为这与捕获屏幕截图有任何关系,但它看起来像是chromedriver 或 chrome 浏览器正在尝试做的事情。
  • 这个问题似乎类似:stackoverflow.com/questions/51959986/…

标签: selenium google-chrome selenium-webdriver selenium-chromedriver


【解决方案1】:
    import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import ru.yandex.qatools.ashot.AShot;
import ru.yandex.qatools.ashot.Screenshot;
import ru.yandex.qatools.ashot.shooting.ShootingStrategies;
import ru.yandex.qatools.ashot.shooting.ShootingStrategy;

import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;

public class Screenshot123 {



    public static void takescreenshot(String filename) throws IOException {
        Screenshot screenshot=new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver);
         
        

       String dest=System.getProperty("user.dir")+"\\ScreenShots\\";
      
     
        ImageIO.write(screenshot.getImage(),"PNG",new File(dest));
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-25
    • 1970-01-01
    • 2019-01-31
    • 2014-11-11
    • 2020-07-26
    • 2021-06-17
    • 2018-07-05
    • 1970-01-01
    相关资源
    最近更新 更多