Window Object Properties

what are the properties that are supported by window object?


Window Object Property:
The following table lists the properties that can be used to get parent window, location as string url, name, status etc.. associated with Window object. All the tests will return the property of current page.
closed Property "Closed" is used to identify whether a window is closed. Returns true if the window is closed.
status Property "status" is used to get the current status of the browser window. i.e It will say loading, if the page is loading. The message is as shown in the status bar.
defaultStatus Property "defaultStatus" is used to declare the default status of the browser window.
document Returns the document object of the current browser page. All its properties and methods will be handled in the coming chapters.
frames Returns an array containing all the frame objects present in the browser window.
history Returns the history object of the current window. All its properties and methods will be seen in the coming chapters.
length Returns an integer defining the number of frames in the page being tested.
location Property 'location' - returns the full url path of the document viewed as string.
name Property 'name' - is used to find the name of the browser window. Return empty string if no name was given.
opener Property 'opener' - Used to identify the object from which the window under testing was created .
parent Property 'parent' - Used to identify the parent window object .
self Property 'self' - Returns the instance of the current window.
top Property 'top' - Used to get the topmost browser window in a series of nested windows.

Ask Questions

Ask Question