represents an open window or tab in a web browser.
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"window make a window active "SetWindowPosition"{window,{x,y}} set the screen position of a window "WindowMaximize"window maximize a window "WindowMinimize"window minimize a window
Examples
open all close allBasic Examples (1)
session = StartWebSession[]Use WebExecute to get the open window as a WebWindowObject:
WebExecute["BrowserWindows"]Delete the session with DeleteObject:
DeleteObject[session]Scope (1)
session = StartWebSession[]Use WebExecute to open a new page:
WebExecute["OpenWebPage" -> "https://www.wolfram.com"]Use WebExecute to open a new browser tab:
WebExecute["JavascriptExecute" -> "window.open('https://www.wolframalpha.com', '_blank')"]Use WebExecute to get the open windows:
windows = WebExecute["BrowserWindows"]Use WebExecute to get the title of the first page:
WebExecute["PageTitle"]Use WebExecute to switch to the second window:
WebExecute["SetBrowserWindow" -> windows[[2]]]Use WebExecute to get the title of the second page:
WebExecute["PageTitle"]Delete the session with DeleteObject:
DeleteObject[session]Related Guides
Related Workflows
- Control a Web Browser Programmatically
History
Text
Wolfram Research (2019), WebWindowObject, Wolfram Language function, https://reference.wolfram.com/language/ref/WebWindowObject.html.
CMS
Wolfram Language. 2019. "WebWindowObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WebWindowObject.html.
APA
Wolfram Language. (2019). WebWindowObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WebWindowObject.html
BibTeX
@misc{reference.wolfram_2026_webwindowobject, author="Wolfram Research", title="{WebWindowObject}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/WebWindowObject.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_webwindowobject, organization={Wolfram Research}, title={WebWindowObject}, year={2019}, url={https://reference.wolfram.com/language/ref/WebWindowObject.html}, note=[Accessed: 13-June-2026]}