C# Класс Selenium.Window

Наследование: ComInterfaces._Window
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetWindowHandle ( RemoteSession session ) : string
Window ( RemoteSession session, Selenium.Core.WindowContext windows, string handle ) : Selenium.Core
uri ( ) : string

Описание методов

Activate() публичный Метод

Change focus to this window.
public Activate ( ) : Window
Результат Window

Close() публичный Метод

Closes the current window.
public Close ( ) : void
Результат void

Equals() публичный Метод

Determines whether the specified instances are considered equal.
public Equals ( object obj ) : bool
obj object Object to compare.
Результат bool

FullScreen() публичный Метод

Set the current window full screen.
public FullScreen ( ) : void
Результат void

GetHashCode() публичный Метод

Returns the hash code
public GetHashCode ( ) : int
Результат int

Maximize() публичный Метод

Maximizes the current window if it is not already maximized.
public Maximize ( ) : void
Результат void

Position() публичный Метод

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
Результат Point

SetPosition() публичный Метод

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
Результат void

SetSize() публичный Метод

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
Результат void

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.
public Size ( ) : Selenium.Size
Результат Selenium.Size

SwitchToNextWindow() публичный Метод

Switch to the next available window
public SwitchToNextWindow ( int timeout = -1 ) : Window
timeout int Optional timeout in milliseconds
Результат Window

SwitchToPreviousWindow() публичный Метод

Switch to the previous focused window.
public SwitchToPreviousWindow ( ) : Window
Результат Window

SwitchToWindowByName() публичный Метод

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
Результат Window

SwitchToWindowByTitle() публичный Метод

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
Результат Window