Skip to content

Commit d6c928a

Browse files
authored
Update README.md
1 parent 5fac567 commit d6c928a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,19 @@ Below are some basic examples of usage.
104104
### Frame screenshots
105105
- Take screenshot of scrollable frame locatable by supplied `frameID`:
106106
```java
107+
driver.switchTo().defaultContent();
107108
Shutterbug.shootFrame(driver, "frameID", CaptureElement.FULL_SCROLL).save();
108109
```
109110

110111
- Take screenshot of scrollable frame web element:
111112
```java
113+
driver.switchTo().defaultContent();
112114
Shutterbug.shootFrame(driver, frameWebElement, CaptureElement.FULL_SCROLL).save();
113115
```
114116

115-
**Please note** that currently full scrollable frame screenshot is only possible
116-
when the full frame is visible in the viewport. If frame size is greater
117-
than viewport size UnsupportedOperationException will be throws suggesting
118-
to use CaptureElement.VIEWPORT instead.
117+
**Please note**
118+
- Currently full scrollable frame screenshot is only possible when the full frame is visible in the viewport. If frame size is greater than viewport size UnsupportedOperationException will be throws suggesting to use CaptureElement.VIEWPORT instead.
119+
- Need to perform `driver.switchTo().defaultContent();` before frame screensot. After the screenshot is taken driver will stay switched to the target frame.
119120

120121
### Scrollable WebElements screenshots
121122

0 commit comments

Comments
 (0)