Skip to content

Commit

Permalink
fix the fitContent() method (#815)
Browse files Browse the repository at this point in the history
this conditional was basically blocking all content fitting from happening.
  • Loading branch information
browner12 authored Sep 17, 2020
1 parent be00c52 commit c8c60e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function fitContent()

$html = $this->driver->findElement(WebDriverBy::tagName('html'));

if (! empty($html) && ($html->getSize()->getWidth() <= 0 || $html->getSize()->getHeight() <= 0)) {
if (! empty($html) && $html->getSize()->getWidth() >= 0 && $html->getSize()->getHeight() >= 0) {
$this->resize($html->getSize()->getWidth(), $html->getSize()->getHeight());
}

Expand Down

0 comments on commit c8c60e4

Please sign in to comment.