Are there any good examples of how to take a screenshot in selenium webdriver C#, then crop and save the image?

混江龙づ霸主 提交于 2019-12-04 18:31:10

Some of the objects you're creating are IDisposable. You need to make sure Dispose() gets called on them. As it stands they're not releasing the memory they've claimed, which is why you get the exceptions.

The easiest way to make sure these items get disposed is to wrap each of them in a using block.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!