George S. Baugh 7 سال پیش
والد
کامیت
33ac8e9da7
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      lib/Selenium/Remote/WebElement.pm

+ 7 - 7
lib/Selenium/Remote/WebElement.pm

@@ -556,13 +556,13 @@ sub is_displayed {
 sub _is_in_viewport {
     my ($self) = @_;
     return $self->driver->execute_script(qq{
-		var rect = arguments[0].getBoundingClientRect();
-		return (
-			rect.top >= 0 &&
-			rect.left >= 0 &&
-			rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
-			rect.right <= (window.innerWidth || document.documentElement.clientWidth)
-		);
+        var rect = arguments[0].getBoundingClientRect();
+        return (
+            rect.top >= 0 &&
+            rect.left >= 0 &&
+            rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
+            rect.right <= (window.innerWidth || document.documentElement.clientWidth)
+        );
     },{'element-6066-11e4-a52e-4f735466cecf'=> $self->{id}});
 }