Skip to content

Commit 845d4fe

Browse files
authored
Merge pull request #3172 from chaitanyas-maker/docs/smartui-region-ignore-doc-updates
docs(smartui): region-ignore updates — coordinate diagram, hooks execute syntax, trim sections
2 parents 2077393 + e378cc4 commit 845d4fe

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

67.6 KB
Loading

docs/smartui-hooks-region-ignore.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ This gives the Web Hooks path the same region controls already available on RD H
5959

6060
Pass a `coordinates` entry (a list of `"x1,y1,x2,y2"` strings) under `ignoreDOM`. SmartUI excludes those rectangles from the comparison. The four values are the left, top, right, and bottom edges of the rectangle in pixels.
6161

62+
<img loading="lazy" src={require('../assets/images/smartui-hooks-region-ignore/coordinate-rectangle.png').default} alt="A coordinate rectangle: x1,y1 is the top-left corner (left=50, top=50) and x2,y2 is the bottom-right corner (right=300, bottom=300), giving a 250 x 250 region." width="503" height="490" className="doc_img img_center"/>
63+
64+
For example, `"50,50,300,300"` defines the region whose top-left corner is at `(left=50, top=50)` and whose bottom-right corner is at `(right=300, bottom=300)` — a 250 × 250 rectangle.
65+
6266
<Tabs className="docs__val" groupId="language">
6367
<TabItem value="java" label="Java" default>
6468

@@ -190,6 +194,7 @@ config.ignoreDOM = {
190194
cssSelector: ['.promo'], // selector
191195
coordinates: ['847,185,1571,734'], // coordinates
192196
};
197+
await driver.executeScript('smartui.takeScreenshot', config);
193198
// both regions are ignored
194199
```
195200

@@ -201,19 +206,13 @@ config["ignoreDOM"] = {
201206
"cssSelector": [".promo"], # selector
202207
"coordinates": ["847,185,1571,734"], # coordinates
203208
}
209+
driver.execute_script("smartui.takeScreenshot", config)
204210
# both regions are ignored
205211
```
206212

207213
</TabItem>
208214
</Tabs>
209215

210-
## Behaviour summary
211-
212-
| Input mode | How you pass it (under `ignoreDOM` / `selectDOM`) | Resolved against | Result |
213-
|------------|---------------------------------------------------|------------------|--------|
214-
| Selector | `id` / `class` / `xpath` / `cssSelector` | Live DOM (`getBoundingClientRect()`) | Region of the matched element(s). |
215-
| Coordinate | `coordinates: ["x1,y1,x2,y2"]` | The produced-image space (viewport or full page) | Exactly the supplied rectangle. |
216-
217216
## Validation and errors
218217

219218
Coordinates are validated at two levels. Note that only the **format** check happens on the hooks ingestion path; **page-bounds** elimination is a downstream comparison-engine behaviour, not part of the hooks request validation:

0 commit comments

Comments
 (0)