A browser window
1 2 3 4 5 6 7 8 9 10 11
A list of
Integer scalar, requested width of the window.
Integer scalar, requested height of the window.
Integer scalar, requested horizontal window position.
Integer scalar, requested vertical window position.
getWindow method of a
returns the current browser window as a
getAllWindows method returns a list of window objects,
all browser windows.
w$close() closes the window.
TRUE if the window is active,
w$switchTo makes the window active.
w$maximize maximizes the window. Currently it sets it to
a fixed size.
w$getSize returns the size of the window, in a list with
height, both integers.
w$setSize sets the size of the window.
w$getPosition returns the position of the window on the
screen. Phantom.js being headless, it always returns
list(x = 0, y = 0), and it is included to have a complete
impelementation of the WebDriver standard.
w$setPosition(x, y) sets the position of the window on the
screen. Phantom.js being headless, it has no effect, and it is included
to have a complete implementation of the WebDriver standard.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.