Skip to content

Commit

Permalink
wdio - clipping for native fps
Browse files Browse the repository at this point in the history
  • Loading branch information
paweltomaszewskisaucelabs committed Nov 15, 2024
1 parent e995ec3 commit e3207ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions visual-js/visual-wdio/src/SauceVisualService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,18 @@ export default class SauceVisualService implements Services.ServiceInstance {
);

const clipSelector = options.clipSelector ?? this.clipSelector;
const clipElement = clipSelector
? await browser.$(clipSelector).elementId
: null;
const clipElement =
clipSelector && !fullPageConfig
? await browser.$(clipSelector).elementId
: null;

const result = await api.createSnapshotFromWebDriver({
captureDom: options.captureDom ?? this.captureDom,
clipElement:
options.clipElement?.elementId ??
this.clipElement?.elementId ??
clipElement,
clipSelector: !clipElement ? clipSelector : null,
sessionId,
jobId,
buildUuid: buildId,
Expand Down

0 comments on commit e3207ef

Please sign in to comment.