WebWindowObject

WebWindowObject[]

represents an open window or tab in a web browser.

Details

  • WebExecute[session,"BrowserWindows"] gives the current list of web window objects for a web session.
  • The following WebExecute commands operate on windows specified by WebWindowObject[]:
  • "SetBrowserWindow"windowmake a window active
    "SetWindowPosition"{window,{x,y}}set the screen position of a window
    "WindowMaximize"windowmaximize a window
    "WindowMinimize"windowminimize a window

Examples

Basic Examples  (2)

Start a web session:

Use WebExecute to get the open window as a WebWindowObject:

Delete the session with DeleteObject:

Start a web session:

Use WebExecute to open a new page:

Use WebExecute to open a new browser tab:

Use WebExecute to get the open windows:

Use WebExecute to get the title of the first page:

Use WebExecute to switch to the second window:

Use WebExecute to get the title of the second page:

Delete the session with DeleteObject:

Introduced in 2019
 (12.0)