-
Notifications
You must be signed in to change notification settings - Fork 28
Description
First of all, the code is not very clear - it took me a few moments to realise what it was doing, all the while I was thinking "but where is the screen height defined and is 100 a sane maximised window height?"
driver-testsuite/tests/Js/WindowTest.php
Line 95 in 9f2fb57
$this->assertLessThanOrEqual(100, $session->evaluateScript($script)); |
It turns out that the test assumes that when a window is maximized, it will be the height of the screen minus some height for desktop widgets such as a taskbar. This extra height is defined as a buffer of up to 100px.
(it could be helpful to assign values to aptly named variables)
Anyway, while testing with Firefox on Selenium (standalone v2.53.1), it seems that the OS needs 102px - causing the test to fail.
A cursory search resulted in this fairly available API that could be used instead of manually checking the window size:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows/WindowState#browser_compatibility