Maximiser la fenêtre SUT - une bonne idée ?

In QF-Test product support we are often asked how to set a QF-Test controlled browser or other SUT windows to fullscreen mode.

It’s better to work with fixed window sizes

In fact, we advise against maximizing windows for the following reason: The maximized window size depends on the system, a fixed window size is the same on every system instead.

QF-Test is comparatively resistant to changes in component coordinates. However, web applications in particular can display completely different page layouts depending on the window size. In the worst case, this can lead to individual components no longer being found.

If the browser is always started with a fixed window size instead, the test behaves uniformly on all computers.

In the preparation sequence that opens the browser, you will find a “Open browser window” node below the “Start SUT if necessary” node, in which you can specify a uniform window size.

How to use fullscreen anyway

If you still want to maximize your browser window, you can use the following Jython server script in QF-Test to maximize all windows containing e.g. “Edge” in the window title under Windows:

import autowin, re

windows = autowin.getAllWindows()
for win in windows:
    title = autowin.getWindowText(win)
    if re.match(".*Edge.*", title):
        autowin.maximizeWindow(win)

You can customize the regular expression ".*Edge.*" to address exactly the window you are interested in with its window title.