SeleniumLibrary
SeleniumLibrary copied to clipboard
Added minimize keyword
Added the access to minimize method, symmetrical to the maximize one.
Please write test, acceptance or unit, for the new keyword.
Hello, I would like to edit/copy the tests for the existing maximize_browser_window
, the sister keyword. Could you please point me to the acceptance tests for that one?
Thx, L
It seems that we do not have one. But easy way would be to use https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Window%20Size and set window size something small Then use new keyword and verify that size is bigger.
Added an acceptance test, using the underlying selenium tests as inspiration. However it seems that even in the selenium library such tests are disabled, perhaps due to instability or unable to access to the browser's maximized/minimized state on all the platforms and OSes.
The minimize test is only checking for windows.hidden
. It seems that accessing to window position and size doesn't provide correct information (position unchanged, horizontal size changes to a random value but height is not).
The maximize test is more robust and size/pos can be used as reference.
Looks good for me. @emanlove what you want to do with the PR?
Hi, I've rebased the branch, but I don't fully understand how to make the checks to pass.
Checking against latest version of unit and acceptance tests but failing tests. Investigating at the moment and wondering if we are running in headless mode if this affects the Page Visibility correctness in reporting .. Did note that the Page Visibility API is supported by all major browsers so concern about browser support shouldn't be an issue.
Mmm yes, it seems that the Windows suite runs in headless mode (browser created only once in the Suite Setup), so it will be quite hard to test the Minimize behavior there. There are no explicit documentation about Visibility API and headless mode interaction. Probably the best approach for such specific test is to run without the --headless flag, but I'm not sure if this violates some policy of the test suite.