Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.
Use expect(driver).toHaveScreenshot() to compare a screenshot of the current native app screen against a stored baseline. This works for both iOS and Android.For web and mobile web visual diffing, see Web & Mobile web screenshots.
expect(driver).toHaveScreenshot(name, options)
name — string used to identify and store the baseline image
Omitting a name and maxMisMatchPercentage makes the baseline hard to identify and causes minor rendering differences to fail the test.
// Avoidawait expect(driver).toHaveScreenshot();
When to use
Your app has a rendering-heavy screen like a chart or map that can’t be asserted with selectors.
Your app has pixel-perfect design requirements and you want automated enforcement.
Your app has gone through a redesign and you need to catch layout regressions.
Your test needs to verify a visual state that no functional assertion can cover.
Avoid toHaveScreenshot when the screen contains timestamps, live data, animations, or other frequently-changing content — these cause false failures. Use a functional assertion instead.
Key options
Option
Description
Recommended
maxMisMatchPercentage
Percentage of pixels allowed to differ (0–100)
1
skipDiffUI
Skip the visual diff UI in the editor
false
maxMisMatchPercentage is a 0–100 percentage, unlike the web API’s maxDiffPixelRatio which is a 0–1 ratio.
Notes
On the first run, no baseline exists yet — the screenshot is saved automatically as the expected image. Review it before relying on the test.
To inspect a visual diff result in the editor, collapse the test block — an icon will appear in the right gutter of that line. Click it to open the Image Diff panel, where you can view the Diff, Expected, Actual, and Compare tabs for each named snapshot.
On subsequent runs, a new screenshot is compared pixel-by-pixel to the baseline. If the difference exceeds the threshold, the test fails and a diff image is saved showing exactly which pixels changed.
If a UI change is intentional, promote the new screenshot as the updated baseline in the QA Wolf editor. Future runs will compare against the new image.
On iOS, baselines are named by device screen size (e.g. home-screen-ios-390×844-expected.png) — a baseline captured on an iPhone 15 will not match an iPhone 15 Plus.
Baselines are stored in team storage under _screenshots_ and are shared across all flows in the same team.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"QA Wolf Docs","colors":{"primary":"#3b3cef","light":"#08edcb","dark":"#3b3cef"},"logo":{"light":"https://mintcdn.com/qawolf/8HFRRs7AoYV9S40R/logo/light.svg?fit=max\u0026auto=format\u0026n=8HFRRs7AoYV9S40R\u0026q=85\u0026s=b9d699b988c7eab072287836c4d9e0d2","dark":"https://mintcdn.com/qawolf/8HFRRs7AoYV9S40R/logo/dark.svg?fit=max\u0026auto=format\u0026n=8HFRRs7AoYV9S40R\u0026q=85\u0026s=cd2ad525ee7dd964ff4836f7df8d2b54","href":"https://www.qawolf.com"},"favicon":{"light":"https://mintcdn.com/qawolf/R2NspCz4NaCGUkW7/favicon.png?fit=max\u0026auto=format\u0026n=R2NspCz4NaCGUkW7\u0026q=85\u0026s=d25b1eaf526daf1590d54c42755028a3","dark":"https://mintcdn.com/qawolf/R2NspCz4NaCGUkW7/favicon.png?fit=max\u0026auto=format\u0026n=R2NspCz4NaCGUkW7\u0026q=85\u0026s=d25b1eaf526daf1590d54c42755028a3"},"appearance":{"default":"dark"},"background":{"decoration":"gradient","color":{"dark":"#0b0b2f"}},"navbar":{"links":[{"href":"mailto:hello@qawolf.com","label":"Support"},{"href":"https://app.qawolf.com/sign-in","label":"Sign in"}],"primary":{"type":"button","label":"Try for free","href":"https://qawolf.com"}},"footer":{"socials":{"x":"https://twitter.com/qawolfhq","github":"https://github.com/qawolf/qawolf","linkedin":"https://www.linkedin.com/company/qa-wolf"}},"seo":{"metatags":{"canonical":"https://docs.qawolf.com"}},"icons":{"library":"lucide"},"integrations":{"posthog":{"apiKey":"phc_qEW3U4XMuhdJa6Rf2QZvbyKcixM5mYyq5BYNopuSxBFw","sessionRecording":true}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qawolf","hasAudioNarration":false,"actualSubdomain":"qawolf","customDomains":["docs.qawolf.com"],"gitSource":{"type":"github","owner":"qawolf","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af65ff536537490d33132a4","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"References","count":43},{"language":"default","tag":"Solutions","count":37},{"language":"default","tag":"Integrations","count":34},{"language":"default","tag":"Features","count":15},{"language":"default","tag":"CI/CD","count":10},{"language":"default","tag":"@qawolf/flows","count":10},{"language":"default","tag":"Legacy triggers","count":9},{"language":"default","tag":"Agentic QA","count":7},{"language":"default","tag":"Audio","count":7},{"language":"default","tag":"Deployment testing","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"hello@qawolf.com"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"visual-diffing-native-app","slug":"/visual-diffing-native-app","pageMetadata":{"title":"Native mobile screenshots","description":"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.","sidebarTitle":"Native mobile","href":"/visual-diffing-native-app"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`expect(driver).toHaveScreenshot()`}),` to compare a screenshot of the current native app screen against a stored baseline. This works for both iOS and Android.`]}),`\n`,_jsxs(_components.p,{children:[`For web and mobile web visual diffing, see `,_jsx(_components.a,{href:`/visual-diffing`,children:`Web \u0026 Mobile web screenshots`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` — string used to identify and store the baseline image`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`options`}),` — optional object controlling comparison behavior, see Key options below`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`iOS`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"home-screen\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxMisMatchPercentage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Android`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"home-screen\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxMisMatchPercentage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Assert a specific element`})}),`\n`,_jsxs(_components.p,{children:[`Pass a WebdriverIO element instead of `,_jsx(_components.code,{children:`driver`}),` to scope the screenshot to a specific UI component:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'`//android.widget.ImageView[@resource-id=\"com.example.app:id/hero_image\"]`'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"hero-image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxMisMatchPercentage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`Omitting a name and `,_jsx(_components.code,{children:`maxMisMatchPercentage`}),` makes the baseline hard to identify and causes minor rendering differences to fail the test.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Avoid`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use`,children:`When to use`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Your app has a rendering-heavy screen like a chart or map that can’t be asserted with selectors.`}),`\n`,_jsx(_components.li,{children:`Your app has pixel-perfect design requirements and you want automated enforcement.`}),`\n`,_jsx(_components.li,{children:`Your app has gone through a redesign and you need to catch layout regressions.`}),`\n`,_jsx(_components.li,{children:`Your test needs to verify a visual state that no functional assertion can cover.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Avoid `,_jsx(_components.code,{children:`toHaveScreenshot`}),` when the screen contains timestamps, live data, animations, or other frequently-changing content — these cause false failures. Use a functional assertion instead.`]}),`\n`,_jsx(Heading,{level:`2`,id:`key-options`,children:`Key options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Recommended`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`maxMisMatchPercentage`})}),_jsx(_components.td,{children:`Percentage of pixels allowed to differ (0–100)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`skipDiffUI`})}),_jsx(_components.td,{children:`Skip the visual diff UI in the editor`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`maxMisMatchPercentage`}),` is a 0–100 percentage, unlike the web API’s `,_jsx(_components.code,{children:`maxDiffPixelRatio`}),` which is a 0–1 ratio.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`On the first run, no baseline exists yet — the screenshot is saved automatically as the expected image. Review it before relying on the test.`}),`\n`,_jsxs(_components.li,{children:[`To inspect a visual diff result in the editor, collapse the test block — an icon will appear in the right gutter of that line. Click it to open the Image Diff panel, where you can view the `,_jsx(_components.strong,{children:`Diff`}),`, `,_jsx(_components.strong,{children:`Expected`}),`, `,_jsx(_components.strong,{children:`Actual`}),`, and `,_jsx(_components.strong,{children:`Compare`}),` tabs for each named snapshot.`]}),`\n`,_jsx(_components.li,{children:`On subsequent runs, a new screenshot is compared pixel-by-pixel to the baseline. If the difference exceeds the threshold, the test fails and a diff image is saved showing exactly which pixels changed.`}),`\n`,_jsx(_components.li,{children:`If a UI change is intentional, promote the new screenshot as the updated baseline in the QA Wolf editor. Future runs will compare against the new image.`}),`\n`,_jsxs(_components.li,{children:[`On iOS, baselines are named by device screen size (e.g. `,_jsx(_components.code,{children:`home-screen-ios-390×844-expected.png`}),`) — a baseline captured on an iPhone 15 will not match an iPhone 15 Plus.`]}),`\n`,_jsxs(_components.li,{children:[`Baselines are stored in team storage under `,_jsx(_components.code,{children:`_screenshots_`}),` and are shared across all flows in the same team.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`full-sample-test`,children:`Full sample test`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`flow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@qawolf/flows/ios\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` flow`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Visual regression — home screen\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`target:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"iOS - iPhone 15 (iOS 26)\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`launch:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` ({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`test`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` test`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assert home screen appearance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` expect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`driver`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toHaveScreenshot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"home-screen\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxMisMatchPercentage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Native mobile screenshots","description":"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.","sidebarTitle":"Native mobile","href":"/visual-diffing-native-app"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"When to use","slug":"when-to-use","depth":2,"children":[]},{"title":"Key options","slug":"key-options","depth":2,"children":[]},{"title":"Notes","slug":"notes","depth":2,"children":[]},{"title":"Full sample test","slug":"full-sample-test","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qawolf/31405aa6fa182398/qawolf-attribution-handler.js","/_mintlify/custom/qawolf/ded78afb53673389/qawolf-signup-handler.js","/_mintlify/custom/qawolf/e00fee94bfdab7ef/posthog_utils.js"],"subdomain":"qawolf","siteName":"QA Wolf Docs","title":"Native mobile screenshots - QA Wolf Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-16T00:05:46.559Z","gitLastModified":"2026-09-16T00:05:00.000Z","originalFileLocation":"visual-diffing-native-app.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\">\u003cmeta data-mint-head name=\"application-name\" content=\"QA Wolf Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Native mobile screenshots - QA Wolf Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"QA Wolf Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qawolf.com/visual-diffing-native-app\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qawolf.mintlify.site/_mintlify/api/og/v2?division=Visual+diffing\u0026amp;title=Native+mobile+screenshots\u0026amp;description=Use+toHaveScreenshot+to+catch+visual+regressions+in+native+iOS+and+Android+apps.\u0026amp;theme=eaef7bfce024a69feee67dd8\u0026amp;signature=aa2ac3164d1259cf4160283461fe22490796bf4d44b5ab9e0fe6c16e079af356\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Native mobile screenshots - QA Wolf Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qawolf.mintlify.site/_mintlify/api/og/v2?division=Visual+diffing\u0026amp;title=Native+mobile+screenshots\u0026amp;description=Use+toHaveScreenshot+to+catch+visual+regressions+in+native+iOS+and+Android+apps.\u0026amp;theme=eaef7bfce024a69feee67dd8\u0026amp;signature=aa2ac3164d1259cf4160283461fe22490796bf4d44b5ab9e0fe6c16e079af356\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qawolf/YyZP4y1fCTI_w0fv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"QA Wolf Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b3cef\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qawolf.com/visual-diffing-native-app\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/visual-diffing-native-app.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qawolf.com/#organization\",\"name\":\"QA Wolf Docs\",\"url\":\"https://docs.qawolf.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qawolf/8HFRRs7AoYV9S40R/logo/light.svg?fit=max\u0026auto=format\u0026n=8HFRRs7AoYV9S40R\u0026q=85\u0026s=b9d699b988c7eab072287836c4d9e0d2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qawolf.com#website\",\"name\":\"QA Wolf Docs\",\"url\":\"https://docs.qawolf.com\",\"publisher\":{\"@id\":\"https://docs.qawolf.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qawolf.com/visual-diffing-native-app#webpage\",\"url\":\"https://docs.qawolf.com/visual-diffing-native-app\",\"name\":\"Native mobile screenshots\",\"description\":\"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\",\"dateModified\":\"2026-09-16T00:05:00.000Z\",\"isPartOf\":{\"@id\":\"https://docs.qawolf.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qawolf.com/visual-diffing-native-app#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qawolf.com/visual-diffing-native-app#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"QA Wolf Docs\",\"item\":\"https://docs.qawolf.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Native mobile screenshots\",\"item\":\"https://docs.qawolf.com/visual-diffing-native-app\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qawolf.com/visual-diffing-native-app#article\",\"headline\":\"Native mobile screenshots\",\"name\":\"Native mobile screenshots\",\"description\":\"Use toHaveScreenshot to catch visual regressions in native iOS and Android apps.\",\"url\":\"https://docs.qawolf.com/visual-diffing-native-app\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qawolf.com/visual-diffing-native-app#webpage\"},\"dateModified\":\"2026-09-16T00:05:00.000Z\",\"publisher\":{\"@id\":\"https://docs.qawolf.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qawolf.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"QA Wolf Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"QA Wolf Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/visual-diffing-native-app.md","siteName":"QA Wolf Docs","nav":{"global":null,"tabs":[{"tab":"Start","pages":[{"title":"Start","href":""}]},{"tab":"Features","pages":[{"title":"Features","href":"/product-mapping"}]},{"tab":"Solutions","pages":[{"title":"Solutions","href":"/solutions"},{"group":"Email \u0026 SMS","pages":[{"title":"Test a feature that sends or receives emails","sidebarTitle":"Use emails in tests","href":"/Use-emails-in-tests"}]},{"group":"Authentication","pages":[{"title":"Test QR code authentication","sidebarTitle":"QR code","href":"/qrcode"},{"title":"Test MFA with an authenticator app","sidebarTitle":"MFA with authenticator app","href":"/test-mfa"}]},{"group":"Networking","pages":[{"group":"Connect to VPN","pages":[{"title":"Connect to a VPN (iOS)","sidebarTitle":"iOS","href":"/network-connectivity"},{"title":"Connect to a VPN (web)","sidebarTitle":"Web","href":"/connect-with-vpn-web"}]},{"group":"Network simulation","pages":[{"title":"Network simulation (iOS)","sidebarTitle":"iOS","href":"/network-simulation"}]},{"group":"Beacon injection","pages":[{"title":"Beacon injection (iOS)","sidebarTitle":"iOS","href":"/i-beacon-injection"}]}]},{"group":"Data sharing","pages":[{"title":"Pass data between flows","href":"/Pass-data-between-flows"},{"title":"Reuse state between runs","href":"/reuse-state-between-runs"},{"title":"Use files in flows","href":"/use-files-in-flows"},{"title":"Use your network drive","sidebarTitle":"Use your network drive","href":"/mount-a-file-share"}]},{"group":"Audio","pages":[{"group":"Microphone injection","pages":[{"title":"Microphone injection (Android)","sidebarTitle":"Android","tag":"Emulator only","href":"/android-audio-injection"},{"title":"Microphone injection (iOS)","sidebarTitle":"iOS","href":"/ios-audio-injection"},{"title":"Microphone injection (Web)","sidebarTitle":"Web","href":"/web-audio-injection"}]},{"group":"Speaker capture","pages":[{"title":"Speaker recording (iOS)","sidebarTitle":"iOS","href":"/audio-capture"},{"title":"Speaker recording (Web)","sidebarTitle":"Web","href":"/web-speaker-capture"}]},{"group":"Audio analysis","pages":[{"title":"Audio analysis (iOS)","sidebarTitle":"iOS","href":"/i-os-audio-analysis"},{"title":"Audio analysis (Web)","sidebarTitle":"Web","href":"/web-audio-analysis"}]}]},{"group":"Camera","pages":[{"group":"Photo library management","pages":[{"title":"iOS photo library management","sidebarTitle":"iOS","href":"/photo-library-management"}]},{"group":"Camera injection","pages":[{"title":"Camera injection","sidebarTitle":"iOS","href":"/camera-and-audio-injection"}]},{"group":"Barcode injection","pages":[{"title":"Android barcode and QR code scanning","sidebarTitle":"Android","tag":"Emulator only","href":"/android-barcode"},{"title":"iOS Barcode and QR code scanning","sidebarTitle":"iOS","href":"/barcode-qrcode-scanning"}]},{"group":"Video Injection","pages":[{"title":"Video injection","sidebarTitle":"iOS","href":"/video-injection"}]}]},{"group":"Accessibility","pages":[{"title":"Measure accessibility for native mobile","sidebarTitle":"Native mobile","href":"/a11y-native"},{"title":"Measure web accessibility with axe-core","sidebarTitle":"Web","href":"/a11y-web"}]},{"group":"Performance","pages":[{"title":"Measure performance (Android)","sidebarTitle":"Android","href":"/android-performance"},{"title":"Measure web page performance","description":"Run a Lighthouse audit in a QA Wolf flow to spot-check Core Web Vitals and key performance metrics.","sidebarTitle":"Web","href":"/web-performance"}]},{"group":"Visual diffing","pages":[{"title":"Native mobile screenshots","sidebarTitle":"Native mobile","href":"/visual-diffing-native-app"},{"title":"Assert visual appearance","description":"Use toHaveScreenshot to catch layout regressions and verify UI elements that can't be targeted with selectors.","sidebarTitle":"Web \u0026 mobile web","href":"/visual-diffing"}]},{"group":"AI \u0026 LLMs","pages":[{"title":"Assert on the meaning of generated text","sidebarTitle":"Semantic assertions","href":"/semantic-assertions"},{"title":"Non-deterministic AI assertions","href":"/non-deterministic-ai-testing"}]},{"group":"Desktop","pages":[{"title":"Testing Windows desktop apps","sidebarTitle":"Windows apps","href":"/windows-desktop"},{"title":"Testing Electron apps","sidebarTitle":"Electron apps","href":"/electron"},{"title":"Test Chrome extensions","sidebarTitle":"Chrome extensions","href":"/browser-extensions"}]},{"group":"Sensors","pages":[{"group":"Location Mocking","pages":[{"title":"Mock device location (Android)","sidebarTitle":"Android","tag":"Emulator only","href":"/android-location-mocking"}]},{"group":"Sensor Mocking","pages":[{"title":"Mock hardware sensors (Android)","sidebarTitle":"Android","tag":"Emulator only","href":"/android-sensor-mocking"}]}]}]},{"tab":"References","pages":[{"title":"References","href":"/anatomy-of-a-flow"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"Full Service","pages":[{"title":"Full Service","href":"/onboarding-to-full-service"}]}]},"basePath":"","title":"Native mobile screenshots - QA Wolf Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}