C# Класс Selenium.Actions

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

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

Метод Описание
Click ( WebElement element = null ) : Actions

Clicks an element.

ClickAndHold ( WebElement element = null ) : Actions

Holds down the left mouse button on an element.

ClickContext ( WebElement element = null ) : Actions

Performs a context-click (right click) on an element.

ClickDouble ( WebElement element = null ) : Actions

Double-clicks an element.

DragAndDrop ( WebElement elementSource, WebElement elementTarget ) : Actions

Holds down the left mouse button on the source element, then moves to the target element and releases the mouse button.

DragAndDropByOffset ( WebElement element, int offset_x, int offset_y ) : Actions

Holds down the left mouse button on the source element, then moves to the target element and releases the mouse button.

KeyDown ( string modifierKey, WebElement element = null ) : Actions

Sends a key press only, without releasing it. Should only be used with modifier keys (Control, Alt and Shift).

KeyUp ( string modifierKey ) : Actions

Releases a modifier key.

MoveByOffset ( int offset_x, int offset_y ) : Actions

Moving the mouse to an offset from current mouse position.

MoveToElement ( WebElement element ) : Actions

Moving the mouse to the middle of an element.

Perform ( ) : void

Performs all stored Actions.

Release ( [ element = null ) : Actions

Releasing a held mouse button.

SendKeys ( string keys, WebElement element = null ) : Actions

Sends keys to an element.

Wait ( int timems ) : Actions

Waits the given time in millisecond.

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

Метод Описание
Actions ( RemoteSession session ) : Selenium.Core
act_click ( WebElement element ) : void
act_click_context ( WebElement element ) : void
act_click_double ( WebElement element ) : void
act_drag_drop ( WebElement elementSource, WebElement elementTarget ) : void
act_drag_drop_offset ( WebElement element, int offset_x, int offset_y ) : void
act_key_down ( string modifierKey, WebElement element ) : void
act_mouse_click ( ) : void
act_mouse_click_context ( ) : void
act_mouse_click_double ( ) : void
act_mouse_mouve ( WebElement element ) : void
act_mouse_mouve ( int offsetX, int offsetY ) : void
act_mouse_press ( WebElement element ) : void
act_mouse_release ( WebElement element ) : void
act_send_keys ( string keys ) : void
act_send_keys ( string keys, WebElement element ) : void
act_send_modifier_key ( string modifierKey ) : void

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

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

Clicks an element.
public Click ( WebElement element = null ) : Actions
element WebElement The element to click. If None, clicks on current mouse position.
Результат Actions

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

Holds down the left mouse button on an element.
public ClickAndHold ( WebElement element = null ) : Actions
element WebElement The element to mouse down. If None, clicks on current mouse position.
Результат Actions

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

Performs a context-click (right click) on an element.
public ClickContext ( WebElement element = null ) : Actions
element WebElement The element to context-click. If None, clicks on current mouse position.
Результат Actions

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

Double-clicks an element.
public ClickDouble ( WebElement element = null ) : Actions
element WebElement The element to double-click. If None, clicks on current mouse position.
Результат Actions

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

Holds down the left mouse button on the source element, then moves to the target element and releases the mouse button.
public DragAndDrop ( WebElement elementSource, WebElement elementTarget ) : Actions
elementSource WebElement The element to mouse down.
elementTarget WebElement The element to mouse up.
Результат Actions

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

Holds down the left mouse button on the source element, then moves to the target element and releases the mouse button.
public DragAndDropByOffset ( WebElement element, int offset_x, int offset_y ) : Actions
element WebElement The element to mouse down.
offset_x int X offset to move to.
offset_y int Y offset to move to.
Результат Actions

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

Sends a key press only, without releasing it. Should only be used with modifier keys (Control, Alt and Shift).
public KeyDown ( string modifierKey, WebElement element = null ) : Actions
modifierKey string The modifier key to Send. Values are defined in Keys class.
element WebElement The element to Send keys. If None, sends a key to current focused element.
Результат Actions

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

Releases a modifier key.
public KeyUp ( string modifierKey ) : Actions
modifierKey string The modifier key to Send. Values are defined in Keys class.
Результат Actions

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

Moving the mouse to an offset from current mouse position.
public MoveByOffset ( int offset_x, int offset_y ) : Actions
offset_x int X offset to move to.
offset_y int Y offset to move to.
Результат Actions

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

Moving the mouse to the middle of an element.
public MoveToElement ( WebElement element ) : Actions
element WebElement The element to move to.
Результат Actions

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

Performs all stored Actions.
public Perform ( ) : void
Результат void

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

Releasing a held mouse button.
public Release ( [ element = null ) : Actions
element [
Результат Actions

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

Sends keys to an element.
public SendKeys ( string keys, WebElement element = null ) : Actions
keys string Keys to send
element WebElement Element to Send keys. If None, Send keys to the current mouse position.
Результат Actions

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

Waits the given time in millisecond.
public Wait ( int timems ) : Actions
timems int Time to wait in millisecond.
Результат Actions