We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f59695 + 862f343 commit f7071ebCopy full SHA for f7071eb
src/Browser.php
@@ -270,10 +270,10 @@ public function fitContent()
270
{
271
$this->driver->switchTo()->defaultContent();
272
273
- $body = $this->driver->findElement(WebDriverBy::tagName('body'));
+ $html = $this->driver->findElement(WebDriverBy::tagName('html'));
274
275
- if (! empty($body)) {
276
- $this->resize($body->getSize()->getWidth(), $body->getSize()->getHeight());
+ if (! empty($html)) {
+ $this->resize($html->getSize()->getWidth(), $html->getSize()->getHeight());
277
}
278
279
return $this;
0 commit comments