Skip to content

Commit 96d0ae3

Browse files
Merge c0bd329 into 124098b
2 parents 124098b + c0bd329 commit 96d0ae3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/visual-testing/integrations/csharp.md

+39
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ sidebar_label: C#/.Net
55
import useBaseUrl from '@docusaurus/useBaseUrl';
66
import Tabs from '@theme/Tabs';
77
import TabItem from '@theme/TabItem';
8+
import FullPageDescription from '../_partials/_fullpage-description.md';
89

910
# C#/.Net WebDriver Integration
1011

@@ -335,6 +336,44 @@ VisualClient = VisualClient.Create(Driver, Region.UsWest1, sauceUsername, sauceA
335336
VisualClient.CaptureDom = true;
336337
```
337338

339+
### Full page screenshots
340+
341+
By default, only the current viewport is captured when `.VisualCheck` is used. You can opt in to capturing the entire page by using the `FullPage` option. It will capture everything by scrolling and stitching multiple screenshots together.
342+
Additionally, you have the option to configure full page settings using the `FullPageConfig` option.
343+
344+
:::note
345+
It's recommended to use the `HideAfterFirstScroll` option for fixed or sticky position elements such as sticky headers or consent banners.
346+
:::
347+
348+
Options:
349+
350+
- `DelayAfterScrollMs`: Delay in ms after scrolling and before taking screenshots (helps with lazy loading content)
351+
- `HideAfterFirstScroll`: Hide elements on the page after first scroll (uses css selectors)
352+
353+
354+
Examples:
355+
356+
```csharp
357+
await VisualClient.VisualCheck("C# full page",
358+
new VisualCheckOptions()
359+
{
360+
FullPage = true,
361+
});
362+
```
363+
364+
```csharp
365+
await VisualClient.VisualCheck("C# full page config",
366+
new VisualCheckOptions()
367+
{
368+
FullPage = true,
369+
FullPageConfig = new FullPageConfig()
370+
{
371+
DelayAfterScrollMs = 500,
372+
HideAfterFirstScroll = new List<string> { ".header" }
373+
}
374+
});
375+
```
376+
338377
## Examples
339378

340379
Two examples are available:

0 commit comments

Comments
 (0)