C# Class Selenium.Core.JavascriptContext

Javascript object
Exibir arquivo Open project: florentbr/SeleniumBasic Class Usage Examples

Public Methods

Method Description
Execute ( string script, object arguments = null, bool unbox = true ) : object

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.

ExecuteAsync ( string script, object arguments = null, bool unbox = true, int timeout = -1 ) : object

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.

WaitFor ( string script, object arguments = null, int timeout = -1 ) : object

Waits for a script to return true or not null.

Private Methods

Method Description
JavascriptContext ( RemoteSession session ) : Selenium
Unbox ( object value ) : object

Method Details

Execute() public method

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
public Execute ( string script, object arguments = null, bool unbox = true ) : object
script string The script to execute.
arguments object Optional - The script arguments.
unbox bool Optional - Converts web elements to objects
return object

ExecuteAsync() public method

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
public ExecuteAsync ( string script, object arguments = null, bool unbox = true, int timeout = -1 ) : object
script string The script to execute.
arguments object Optional - The script arguments.
unbox bool Optional - Converts web elements to objects
timeout int Optional - Optional timeout in milliseconds.
return object

WaitFor() public method

Waits for a script to return true or not null.
public WaitFor ( string script, object arguments = null, int timeout = -1 ) : object
script string Piece of JavaScript code to execute.
arguments object Optional arguments for the script.
timeout int Optional timeout in milliseconds.
return object