You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Region-Based Ignore/Select for Dynamic Content (Advanced)
259
+
260
+
To handle dynamic content like timestamps, user names, ads, or banners that cause false positives in visual comparisons, SmartUI supports region-based ignore and select functionality using **XPath locators**.
261
+
262
+
You can either:
263
+
-**Ignore specific regions** during comparison using `ignoreBoxes`
264
+
-**Compare only specific regions** using `selectBoxes`
265
+
266
+
This is especially useful for enterprise applications where certain UI elements change dynamically between test runs.
267
+
268
+
### Usage in Node.js (Primary Example)
269
+
270
+
```javascript title="Example: Ignoring Dynamic Elements in Node.js"
@@ -377,7 +500,7 @@ config.put("pageCount", 15); // Enter the number of pages for the Full Page scre
377
500
Please note that this webhook is only applicable to <b>native app screenshots</b> and has known limitations. You can use an optimized value of page count (between 1 and 20) to get the best results of your full page screenshots, according to your use case.
378
501
:::
379
502
380
-
For additional information about appium framework please explore the documentation [here](https://www.lambdatest.com/support/docs/getting-started-with-lambdatest-automation/)
503
+
For additional information about appium framework please explore the documentation [here](https://www.lambdatest.com/support/docs/appium-nodejs/)
@@ -214,6 +214,79 @@ ssConfig.put("platform", "iOS/Android"); // Use the actual platform
214
214
The device name and platform you specify here are used only for screenshot organization and comparison. The actual device selection is handled by your cloud provider's capabilities configuration.
215
215
:::
216
216
217
+
## Region-Based Ignore/Select Functionality for Dynamic Content
218
+
219
+
To handle dynamic content like timestamps, usernames, or ads that cause false positives in visual comparisons, SmartUI App SDK supports region-based ignore and select functionality using XPath locators.
220
+
221
+
You can either:
222
+
-**Ignore specific regions** during comparison using `ignoreBoxes`
223
+
-**Compare only specific regions** using `selectBoxes`
224
+
225
+
This feature requires the `Gson` library for JSON serialization. Add it to your `pom.xml` if not already present:
226
+
227
+
```xml
228
+
<dependency>
229
+
<groupId>com.google.code.gson</groupId>
230
+
<artifactId>gson</artifactId>
231
+
<version>2.10.1</version>
232
+
</dependency>
233
+
```
234
+
235
+
### Usage Examples
236
+
237
+
#### 1. Ignoring Regions (Recommended for Dynamic Content)
0 commit comments