This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
WebDriver

WebDriver

Top  Previous  Next

 

This is a JavaScript wrapper for RemoteWebDriver of Selenium .NET library.

 

 

Action Summary

 

Action

Description

Close

Close the Browser and Dispose of WebDriver.

CreateDriver

This will create a WebDriver for currently selected Browser profile.

Dispose

Dispose of WebDriver.

ExecuteScript

Executes JavaScript in the context of the currently selected frame or window.

FindElementByClassName

Finds the first element in the page that matches the CSS Class supplied.

FindElementByCssSelector

Finds the first element matching the specified CSS selector.

FindElementById

Finds the first element in the page that matches the ID supplied.

FindElementByLinkText

Finds the first of elements that match the link text supplied.

FindElementByName

Finds the first of elements that match the name supplied.

FindElementByPartialLinkText

Finds the first of elements that match the part of the link text supplied.

FindElementByTagName

Finds the first of elements that match the DOM Tag supplied.

FindElementByXPath

Finds the first of elements that match the XPath supplied.

FindElementsByClassName

Finds a list of elements that match the class name supplied.

FindElementsByCssSelector

Finds all elements matching the specified CSS selector.

FindElementsById

Finds the first element in the page that matches the ID supplied.

FindElementsByLinkText

Finds a list of elements that match the link text supplied.

FindElementsByName

Finds a list of elements that match the name supplied.

FindElementsByPartialLinkText

Finds a list of elements that match the part of the link text supplied.

FindElementsByTagName

Finds a list of elements that match the DOM Tag supplied.

FindElementsByXPath

Finds a list of elements that match the XPath supplied.

GetCurrentWindowHandle

Gets the current window handle, which is an opaque handle to this window that uniquely identifies it within this driver instance.

GetPageSource

Gets the source of the page last loaded by the browser.

GetScreenshot

Gets the screenshot of the page.

GetScreenshotIW

 

GetTitle

Gets the title of the current browser window.

GetUrl

Gets the URL the browser is currently displaying.

GetWindowHandles

Gets the window handles of open browser windows.

Quit

Disconnects from the Browser.

SetUrl

Sets the URL the browser is currently displaying.

SwitchToAlert

Switches to the currently active modal dialog for this particular driver instance.

SwitchToDefaultContent

Change the active frame to the default.

SwitchToFrame

Move to different frame using its element.

SwitchToLastWindow

Switch to last browser window.

SwitchToParentFrame

Select the parent frame of the currently selected frame.

SwitchToWindow

Switch to window specified by handle.

 

Action Detail

 

Close()

Close the Browser and Dispose of WebDriver.

 

CreateDriver()

This will create a WebDriver for currently selected Browser profile.

 

Returns:

 

WebDriver object.

 

Dispose()

Dispose of WebDriver.

 

ExecuteScript(script, args)

Executes JavaScript in the context of the currently selected frame or window.

 

Parameters:

 

Name

Type

Description

script

String

The JavaScript code to execute.

args

Array

The arguments to the script.

 

Returns:

 

Null, string or element depending on the script.

 

FindElementByClassName(className)

Finds the first element in the page that matches the CSS Class supplied.

 

Parameters:

 

Name

Type

Description

className

String

CSS class name of the element.

 

Returns:

 

element or null.

 

FindElementByCssSelector(cssSelector)

Finds the first element matching the specified CSS selector.

 

Parameters:

 

Name

Type

Description

cssSelector

String

The CSS selector to match.

 

Returns:

 

element ot null.

 

FindElementById(id)

Finds the first element in the page that matches the ID supplied.

 

Parameters:

 

Name

Type

Description

id

String

ID of the element.

 

Returns:

 

element or null.

 

FindElementByLinkText(linkText)

Finds the first of elements that match the link text supplied.

 

Parameters:

 

Name

Type

Description

linkText

String

Link text of element.

 

Returns:

 

element or null.

 

FindElementByName(name)

Finds the first of elements that match the name supplied.

 

Parameters:

 

Name

Type

Description

name

String

Name of the element on the page.

 

Returns:

 

element or null.

 

FindElementByPartialLinkText(partialLinkText)

Finds the first of elements that match the part of the link text supplied.

 

Parameters:

 

Name

Type

Description

partialLinkText

String

Part of the link text.

 

Returns:

 

element or null.

 

FindElementByTagName(tagName)

Finds the first of elements that match the DOM Tag supplied.

 

Parameters:

 

Name

Type

Description

tagName

String

DOM tag Name of the element being searched.

 

Returns:

 

element or null.

 

FindElementByXPath(xpath)

Finds the first of elements that match the XPath supplied.

 

Parameters:

 

Name

Type

Description

xpath

String

xpath to the element.

 

Returns:

 

element or null.

 

FindElementsByClassName(className)

Finds a list of elements that match the class name supplied.

 

Parameters:

 

Name

Type

Description

className

String

className of the element.

 

Returns:

 

array of elements.

 

FindElementsByCssSelector(cssSelector)

Finds all elements matching the specified CSS selector.

 

Parameters:

 

Name

Type

Description

cssSelector

String

The CSS selector to match.

 

Returns:

 

array of elements.

 

FindElementsById(id)

Finds the first element in the page that matches the ID supplied.

 

Parameters:

 

Name

Type

Description

id

String

ID of the element.

 

Returns:

 

array of elements.

 

FindElementsByLinkText(linkText)

Finds a list of elements that match the link text supplied.

 

Parameters:

 

Name

Type

Description

linkText


Link text of element.

 

Returns:

 

array of elements.

 

FindElementsByName(name)

Finds a list of elements that match the name supplied.

 

Parameters:

 

Name

Type

Description

name

String

Name of the element on the page.

 

Returns:

 

array of elements.

 

FindElementsByPartialLinkText(partialLinkText)

Finds a list of elements that match the part of the link text supplied.

 

Parameters:

 

Name

Type

Description

partialLinkText

String

Part of the link text.

 

Returns:

 

array of elements.

 

FindElementsByTagName(tagName)

Finds a list of elements that match the DOM Tag supplied.

 

Parameters:

 

Name

Type

Description

tagName

String

DOM tag Name of the element being searched.

 

Returns:

 

array of elements.

 

FindElementsByXPath(xpath)

Finds a list of elements that match the XPath supplied.

 

Parameters:

 

Name

Type

Description

xpath

String

xpath to the element.

 

Returns:

 

array of elements.

 

GetCurrentWindowHandle()

Gets the current window handle, which is an opaque handle to this window that uniquely identifies it within this driver instance.

 

GetPageSource()

Gets the source of the page last loaded by the browser.

 

GetScreenshot()

Gets the screenshot of the page.

 

GetScreenshotIW()

 

 

GetTitle()

Gets the title of the current browser window.

 

GetUrl()

Gets the URL the browser is currently displaying.

 

GetWindowHandles()

Gets the window handles of open browser windows.

 

Quit()

Disconnects from the Browser.

 

SetUrl(url)

Sets the URL the browser is currently displaying.

 

Parameters:

 

Name

Type

Description

url

String

The URL to display

 

SwitchToAlert()

Switches to the currently active modal dialog for this particular driver instance.

 

SwitchToDefaultContent()

Change the active frame to the default.

 

SwitchToFrame(el)

Move to different frame using its element.

 

Parameters:

 

Name

Type

Description

el

WebElementWrapper

Element of the frame.

 

SwitchToLastWindow()

Switch to last browser window.

 

SwitchToParentFrame()

Select the parent frame of the currently selected frame.

 

SwitchToWindow(windowHandle)

Switch to window specified by handle.

 

Parameters:

 

Name

Type

Description

windowHandle