C# Class Selenium.Window

Inheritance: ComInterfaces._Window
Exibir arquivo Open project: florentbr/SeleniumBasic Class Usage Examples

Public Methods

Method Description
Activate ( ) : Window

Change focus to this window.

Close ( ) : void

Closes the current window.

Equals ( object obj ) : bool

Determines whether the specified instances are considered equal.

FullScreen ( ) : void

Set the current window full screen.

GetHashCode ( ) : int

Returns the hash code

Maximize ( ) : void

Maximizes the current window if it is not already maximized.

Position ( ) : Point

Gets the position of the browser window relative to the upper-left corner of the screen.

When setting this property, it should act as the JavaScript window.moveTo() method.

SetPosition ( int x, int y ) : void

Sets the position of the browser window relative to the upper-left corner of the screen.

SetSize ( int width, int height ) : void

Sets the size of the outer browser window, including title bars and window borders.

Size ( ) : Selenium.Size

Gets the size of the outer browser window, including title bars and window borders.

When setting this property, it should act as the JavaScript window.resizeTo() method.

SwitchToNextWindow ( int timeout = -1 ) : Window

Switch to the next available window

SwitchToPreviousWindow ( ) : Window

Switch to the previous focused window.

SwitchToWindowByName ( string name, int timeout = -1 ) : Window

Change focus to another window.

SwitchToWindowByTitle ( string title, int timeout = -1 ) : Window

Change focus to another window.

Private Methods

Method Description
GetWindowHandle ( RemoteSession session ) : string
Window ( RemoteSession session, Selenium.Core.WindowContext windows, string handle ) : Selenium.Core
uri ( ) : string

Method Details

Activate() public method

Change focus to this window.
public Activate ( ) : Window
return Window

Close() public method

Closes the current window.
public Close ( ) : void
return void

Equals() public method

Determines whether the specified instances are considered equal.
public Equals ( object obj ) : bool
obj object Object to compare.
return bool

FullScreen() public method

Set the current window full screen.
public FullScreen ( ) : void
return void

GetHashCode() public method

Returns the hash code
public GetHashCode ( ) : int
return int

Maximize() public method

Maximizes the current window if it is not already maximized.
public Maximize ( ) : void
return void

Position() public method

Gets the position of the browser window relative to the upper-left corner of the screen.
When setting this property, it should act as the JavaScript window.moveTo() method.
public Position ( ) : Point
return Point

SetPosition() public method

Sets the position of the browser window relative to the upper-left corner of the screen.
public SetPosition ( int x, int y ) : void
x int X
y int Y
return void

SetSize() public method

Sets the size of the outer browser window, including title bars and window borders.
public SetSize ( int width, int height ) : void
width int
height int
return void

Size() public method

Gets the size of the outer browser window, including title bars and window borders.
When setting this property, it should act as the JavaScript window.resizeTo() method.
public Size ( ) : Selenium.Size
return Selenium.Size

SwitchToNextWindow() public method

Switch to the next available window
public SwitchToNextWindow ( int timeout = -1 ) : Window
timeout int Optional timeout in milliseconds
return Window

SwitchToPreviousWindow() public method

Switch to the previous focused window.
public SwitchToPreviousWindow ( ) : Window
return Window

SwitchToWindowByName() public method

Change focus to another window.
public SwitchToWindowByName ( string name, int timeout = -1 ) : Window
name string Name of the window
timeout int Optional timeout in milliseconds
return Window

SwitchToWindowByTitle() public method

Change focus to another window.
public SwitchToWindowByTitle ( string title, int timeout = -1 ) : Window
title string Title of the window
timeout int Optional timeout in milliseconds
return Window