Noksa / WebDriver.Screenshots.Extensions

C# WebDriver screenshots extensions, like a screenshot entire page
MIT License
12 stars 9 forks source link

Fixed navigation menu screenshot issue #22

Closed venkivb4u closed 5 years ago

venkivb4u commented 5 years ago

I have a application that has a fixed navigation menu. When it takes screenshot, the menu appears on all the segment of the screenshot. Please suggest how to fix or handle it?

Thanks! Venky.

Noksa commented 5 years ago

Hello, @venkivb4u! You can delete an any element before taking a screenshot.

Just use CutterDecorator: https://github.com/Noksa/WebDriver.Screenshots.Extensions/wiki/Decorators#CutterDecorator

Example: https://github.com/Noksa/WebDriver.Screenshots.Extensions/wiki/Cut-strategies

Or you can hide any element before taking a screenshot. After taking the screenshot, the hidden element will be visible again. This strategy may cause the screenshots to be incorrectly glued, as layout may change.

Example: https://github.com/Noksa/WebDriver.Screenshots.Extensions/wiki/Hide-elements