-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
557aaec
commit 50530e4
Showing
7 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
docs/visual-testing/_partials/_baseline-overrides-csharp.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
At the global / client level | ||
|
||
```csharp | ||
VisualClient = await VisualClient.Create(Driver, Region.UsWest1); | ||
VisualClient.BaselineOverride = new BaselineOverride() | ||
{ | ||
Browser = Browser.Chrome, | ||
Device = "Desktop (1024x627)", | ||
OperatingSystem = OperatingSystem.Windows, | ||
OperatingSystemVersion = "10", | ||
}; | ||
``` | ||
|
||
Or at the snapshot level | ||
|
||
```csharp | ||
await VisualClient.VisualCheck("Login Page", new VisualCheckOptions() | ||
{ | ||
BaselineOverride = new BaselineOverride() | ||
{ | ||
Browser = Browser.Chrome, | ||
Device = "Desktop (1024x627)", | ||
OperatingSystem = OperatingSystem.Windows, | ||
OperatingSystemVersion = "10", | ||
} | ||
}); | ||
``` |
18 changes: 18 additions & 0 deletions
18
docs/visual-testing/_partials/_baseline-overrides-python-robot.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
At the global / client level | ||
|
||
```robot | ||
*** Keywords *** | ||
# Typically you'd set this up in your __init__.robot file at the top-level, right after creating your visual build. | ||
Setup | ||
${override} = Visual BaselineOverride browser=CHROME device=Desktop (1024x627) operating_system=WINDOWS operating_system_version=10 | ||
Visual Set Global BaselineOverride ${override} | ||
``` | ||
|
||
Or at the snapshot level | ||
|
||
```robot | ||
*** Test Cases *** | ||
Valid Login | ||
${override} = Visual BaselineOverride browser=CHROME device=Desktop (1024x627) operating_system=WINDOWS operating_system_version=10 | ||
Visual Snapshot Login Page baseline_override=${override} | ||
``` |
33 changes: 33 additions & 0 deletions
33
docs/visual-testing/_partials/_baseline-overrides-python.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
At the global / client level | ||
|
||
```python | ||
from saucelabs_visual.client import SauceLabsVisual | ||
from saucelabs_visual.typing import BaselineOverride, Browser, OperatingSystem | ||
|
||
visual_client = SauceLabsVisual() | ||
visual_client.baseline_override = BaselineOverride( | ||
browser=Browser.CHROME, | ||
device="Desktop (1024x627)", | ||
operatingSystem=OperatingSystem.WINDOWS, | ||
operatingSystemVersion="10", | ||
) | ||
``` | ||
|
||
Or at the snapshot level | ||
|
||
```python | ||
from saucelabs_visual.client import SauceLabsVisual | ||
from saucelabs_visual.typing import BaselineOverride, Browser, OperatingSystem | ||
# ... | ||
visual_client = SauceLabsVisual() | ||
visual_client.create_snapshot_from_webdriver( | ||
"Login Page", | ||
driver=driver, | ||
baseline_override=BaselineOverride( | ||
browser=Browser.CHROME, | ||
device="Desktop (1024x627)", | ||
operatingSystem=OperatingSystem.WINDOWS, | ||
operatingSystemVersion="10", | ||
) | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
At the global / service level | ||
|
||
```js | ||
import { Browser, OperatingSystem } from '@saucelabs/visual'; | ||
export const config = { | ||
// ... | ||
services: [ | ||
'sauce', | ||
[ | ||
'@saucelabs/wdio-sauce-visual-service', | ||
{ | ||
baselineOverride: { | ||
browser: Browser.Chrome, | ||
device: "Desktop (1024x627)", | ||
operatingSystem: OperatingSystem.Windows, | ||
operatingSystemVersion: '10', | ||
}, | ||
}, | ||
], | ||
], | ||
} | ||
``` | ||
|
||
Or at the snapshot level | ||
|
||
```js | ||
import { Browser, OperatingSystem } from '@saucelabs/visual'; | ||
// ... | ||
// Passing on a per-snapshot level | ||
await browser.sauceVisualCheck('Inventory Page', { | ||
baselineOverride: { | ||
browser: Browser.Chrome, | ||
device: "Desktop (1024x627)", | ||
operatingSystem: OperatingSystem.Windows, | ||
operatingSystemVersion: '10', | ||
} | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.