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

Navigator

Top  Previous  Next

 

Navigator object. This is used to provide functions for manipulating the web browser when using the HTML libraries

 

 

Action Summary

 

Action

Description

Find

Returns the HTMLObject wrapping a DOM element for a given 'xpath'.

ExecJS

Executes given JavaScript statement in a browser and returns results.

Open

Opens a browser. If URL is specified, goes to URL.

Close

Closes browser. Finishes session.

Navigate

Redirects browser to a specified URL.

DoCheckAlert

Waits until browser alert with a given text. Wait timeout is 10 seconds.

DoCheckConfirmation

Waits until browser confirmation with a given text. Wait timeout is 10 seconds.

DoSetExpectedPromptResult

Set text to return as a result of next browser 'prompt' request

DoSetExpectedConfirmResult

Set boolean value to return as a result of next browser 'confirm' request

DoCheckPrompt

Waits until browser prompt with a given text. Wait timeout is 10 seconds.

 

Action Detail

 

Find (xpath, url, title, objInfo)

Returns the HTMLObject wrapping a DOM element for a given 'xpath'

 

Parameters:

 

Name

Type

Description

xpath

String

The xpath selector for the object

url

String

If a new navigator is launched, this URL is used

title

String

The title of the HTML document that is being searched

objInfo

SeSObjectInfo

A populated SeSObjectInfo object

 

Returns:

 

The HTMLObject of the elements that matches the XPath selector

 

ExecJS(scriptText)

Executes the given JavaScript statement in a browser and returns results.

 

Parameters:

 

Name

Type

Description

scriptText

String

JavaScript code.

 

Returns:

 

The results from executing the Javascript code

 

Open(url)

Opens a browser. If URL is specified, goes to URL.

 

Parameters:

 

Name

Type

Description

url

String

start URL for opening browser. Can be 'null'.

 

Returns:

 

Nothing

 

Close()

Closes browser. Finishes session.

 

Parameters:

 

None

 

Returns:

 

Nothing

 

Navigate(url)

Redirects browser to a specified URL.

 

Parameters:

 

Name

Type

Description

url

String

The URL to navigate to.

 

Returns:

 

Nothing

 

DoCheckAlert(msg)

Waits until browser alert with a given text. Wait timeout is 10 seconds.

 

Parameters:

 

Name

Type

Description

msg

String

alert text. Can be exact text or regular expression

 

Returns:

 

'true' if browser alert had occurred, 'false' otherwise.

 

DoCheckConfirmation(msg, result)

Waits until browser confirmation with a given text. Wait timeout is 10 seconds.

 

Parameters:

 

Name

Type

Description

msg

String

confirmation text. Can be exact text or regular expression

result

String

Not used - can leave empty

 

Returns:

 

'true' if browser confirmation popup is shown, 'false' otherwise.

 

DoSetExpectedPromptResult(expectedRes)

Set text to return as a result of next browser 'prompt' request

 

Parameters:

 

Name

Type

Description

expectedRes

String

The text to be returned in the next request

 

Returns:

 

Nothing

 

DoSetExpectedConfirmResult(expectedRes)

Set boolean value to return as a result of next browser 'confirm' request

 

Parameters:

 

Name

Type

Description

expectedRes

String

The text to be returned in the next request

 

Returns:

 

'true' if browser confirmation popup is shown, 'false' otherwise.

 

DoCheckPrompt(msg, result)

Waits until browser prompt with a given text. Wait timeout is 10 seconds.

 

Parameters:

 

Name

Type

Description

msg

String

confirmation text. Can be exact text or regular expression

result

String

Not used - can leave empty

 

Returns:

 

'true' if browser confirmation popup is shown, 'false' otherwise.