Show / Hide Table of Contents

Interface ITestingDriver

The Interface for the Testing Driver software.

Namespace: TestingDriver
Assembly: TestingDriver.dll
Syntax
public interface ITestingDriver

Properties

| Improve this Doc View Source

CurrentURL

Gets the url of the page the webdriver is focued on.

Declaration
string CurrentURL { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ErrorContainer

Gets or sets the error container to check if any errors are shown on the UI.

Declaration
string ErrorContainer { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LoadingSpinner

Gets or sets the loadiong spinner that appears on the website.

Declaration
string LoadingSpinner { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LocalTimeout

Gets or sets the local timeout to attempt to find and wait for elements.

Declaration
int LocalTimeout { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Name

Gets the name of the testing driver.

Declaration
ITestingDriver.TestingDriverType Name { get; }
Property Value
Type Description
ITestingDriver.TestingDriverType

Methods

| Improve this Doc View Source

AcceptAlert()

Accepts the alert provided that there is an alert.

Declaration
void AcceptAlert()
| Improve this Doc View Source

Back()

Goes back a page.

Declaration
void Back()
| Improve this Doc View Source

Check(String, Boolean, String)

Performs the actions of clicking a check box. Uses Selenium binding by default.

Declaration
void Check(string xPath, bool byJS = false, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to find the specified element.

System.Boolean byJS

Whether to use JS to perform the click / not.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

CheckErrorContainer()

Checks if there are any errors in the error container.

Declaration
void CheckErrorContainer()
| Improve this Doc View Source

CheckForElementState(String, ITestingDriver.ElementState, String)

Checks for an element state.

Declaration
bool CheckForElementState(string xPath, ITestingDriver.ElementState state, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to find the web element.

ITestingDriver.ElementState state

The state of the web element to wait for.

System.String jsCommand

Any JS command to use when finding the element.

Returns
Type Description
System.Boolean

If the element state is as wanted.

| Improve this Doc View Source

ClickElement(String, Boolean, String)

Performs the actions of clicking the specified element. Uses Selenium binding by default.

Declaration
void ClickElement(string xPath, bool byJS = false, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to find the specified element.

System.Boolean byJS

Whether to use JS to perform the click / not.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

CloseBrowser(Boolean)

Closes the current window. It will quit the browser if it is the last window opened.

Declaration
void CloseBrowser(bool all = true)
Parameters
Type Name Description
System.Boolean all

Whether to close all tabs in the browser.

| Improve this Doc View Source

DismissAlert()

Dismisses the alert provided taht there is an alert.

Declaration
void DismissAlert()
| Improve this Doc View Source

ExecuteJS(String)

Executes JS command.

Declaration
void ExecuteJS(string jsCommand)
Parameters
Type Name Description
System.String jsCommand

command.

| Improve this Doc View Source

ForceKillWebDriver()

Force kill web driver.

Declaration
void ForceKillWebDriver()
| Improve this Doc View Source

Forward()

Goes Fowards a page.

Declaration
void Forward()
| Improve this Doc View Source

GenerateAODAResults(String)

Generates the AODA results.

Declaration
void GenerateAODAResults(string folderLocation)
Parameters
Type Name Description
System.String folderLocation

The folder to generate AODA results in.

| Improve this Doc View Source

GetAlertText()

Gets the text inside the alert.

Declaration
string GetAlertText()
Returns
Type Description
System.String

Alert Text.

| Improve this Doc View Source

GetAllLinksURL()

The GetAllLinksURL.

Declaration
List<string> GetAllLinksURL()
Returns
Type Description
System.Collections.Generic.List<System.String>

The List{string}.

| Improve this Doc View Source

GetElementAttribute(String, String, String)

Returns the given attribute for the element given.

Declaration
string GetElementAttribute(string attributeName, string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String attributeName

The name of the attribute.

System.String xPath

xpath to find the attribute.

System.String jsCommand

any js command to use.

Returns
Type Description
System.String

the value of the attribute.

| Improve this Doc View Source

GetElementText(String, String)

Returns the given text for the element given.

Declaration
string GetElementText(string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

xpath to find the attribute.

System.String jsCommand

any js command to use.

Returns
Type Description
System.String

the value of the attribute.

| Improve this Doc View Source

LaunchNewTab(String, Boolean)

Tells the browser to launch a new tab.

Declaration
bool LaunchNewTab(string url = "", bool instantiateNewDriver = false)
Parameters
Type Name Description
System.String url

URL for the browser to navigate to.

System.Boolean instantiateNewDriver

Instantiates a new selenium driver.

Returns
Type Description
System.Boolean
true
if the navigation was successful.
| Improve this Doc View Source

Maximize()

Maximizes the browser.

Declaration
void Maximize()
| Improve this Doc View Source

NavigateToURL(String, Boolean)

Tells the browser to navigate to the provided url.

Declaration
bool NavigateToURL(string url = "", bool instantiateNewDriver = true)
Parameters
Type Name Description
System.String url

URL for the browser to navigate to.

System.Boolean instantiateNewDriver

Instantiates a new selenium driver.

Returns
Type Description
System.Boolean
true
if the navigation was successful.
| Improve this Doc View Source

PopulateElement(String, String, String)

Performs the action of populating a value.

Declaration
void PopulateElement(string xPath, string value, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to use to identify the element.

System.String value

The value to populate.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

Quit()

Quits the webdriver. Call this when you want the driver to be closed.

Declaration
void Quit()
| Improve this Doc View Source

RefreshWebPage()

Refreshes the webpage.

Declaration
void RefreshWebPage()
| Improve this Doc View Source

RunAODA(String)

Method to run aoda on the current web page.

Declaration
void RunAODA(string providedPageTitle)
Parameters
Type Name Description
System.String providedPageTitle

Title of the web page the user provides.

| Improve this Doc View Source

SelectValueInElement(String, String, String)

Performs the action of selecting a value in an element.

Declaration
void SelectValueInElement(string xPath, string value, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to use to identify the element.

System.String value

The value to select in the element.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

SendKeys(String)

The SendKeys.

Declaration
void SendKeys(string keystroke)
Parameters
Type Name Description
System.String keystroke

The keystrokeSystem.String.

| Improve this Doc View Source

SetTimeOutThreshold(String)

Sets the global timeout in seconds.

Declaration
void SetTimeOutThreshold(string seconds)
Parameters
Type Name Description
System.String seconds

maximum duration of timeout.

| Improve this Doc View Source

SwitchToIFrame(String, String)

Switches to appropriate IFrame. Use root in xpath to leave the iframe.

Declaration
void SwitchToIFrame(string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

xPath to find the iFrame. use "root" to leave iframe.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

SwitchToTab(Int32)

The SwitchToTab.

Declaration
void SwitchToTab(int tab)
Parameters
Type Name Description
System.Int32 tab

The tabSystem.Int32.

| Improve this Doc View Source

TakeEntireScreenshot(String, Boolean)

Takes a screenshot of the browser. Screenshot will have the datestamp as its name. Year Month Date Hour Minutes Seconds (AM/PM).

Declaration
bool TakeEntireScreenshot(string fileName, bool isMobile)
Parameters
Type Name Description
System.String fileName

The fileName of the testing driver.

System.Boolean isMobile

Whether it is a mobile device.

Returns
Type Description
System.Boolean
true
if screenshot was successfully taken.
| Improve this Doc View Source

TakeScreenShot(String)

Takes a screenshot of the browser. Screenshot will have the datestamp as its name. Year Month Date Hour Minutes Seconds (AM/PM).

Declaration
void TakeScreenShot(string fileName)
Parameters
Type Name Description
System.String fileName

The fileName of the testing driver.

| Improve this Doc View Source

Uncheck(String, Boolean, String)

Performs the actions of unchecking the specified element. Uses Selenium binding by default.

Declaration
void Uncheck(string xPath, bool byJS = false, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to find the specified element.

System.Boolean byJS

Whether to use JS to perform the click / not.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

VerifyAttribute(String, String, String, String)

Returns whether or not the actual attribute value of the check box matches with the expected value, given a verification attribute string to check.

Declaration
bool VerifyAttribute(string attribute, string expectedValue, string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String attribute

Verification attribute string to check.

System.String expectedValue

Expected value to compare with.

System.String xPath

The xpath of the element.

System.String jsCommand

Any js command needed.

Returns
Type Description
System.Boolean
true
if actual attribute value matches with the expected value.
| Improve this Doc View Source

VerifyDropDownContent(List<String>, String, String)

Returns whether or not the drop down list contains all the given strings.

Declaration
bool VerifyDropDownContent(List<string> expected, string xPath, string jsCommand = "")
Parameters
Type Name Description
System.Collections.Generic.List<System.String> expected

The list of expected strings.

System.String xPath

The xpath of the element.

System.String jsCommand

Any js command needed.

Returns
Type Description
System.Boolean
true
the drop down contains all the given strings.
| Improve this Doc View Source

VerifyElementSelected(String, String)

Returns whether or not the element is selected or not.

Declaration
bool VerifyElementSelected(string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath of the element.

System.String jsCommand

Any js command needed.

Returns
Type Description
System.Boolean
true
the element is current selected.
| Improve this Doc View Source

VerifyElementText(String, String, String)

Returns whether or not the element's text is the same as the expected value.

Declaration
bool VerifyElementText(string expected, string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String expected

What the value is expected to be.

System.String xPath

The xpath of the element.

System.String jsCommand

Any js command needed.

Returns
Type Description
System.Boolean
true
if it is the same.
| Improve this Doc View Source

VerifyFieldValue(String, String, String)

Returns whether or not the element's value attribute is the same as the expected value. Usually for form-like elements.

Declaration
bool VerifyFieldValue(string expected, string xPath, string jsCommand = "")
Parameters
Type Name Description
System.String expected

What the value is expected to be.

System.String xPath

The xpath of the element.

System.String jsCommand

Any js command needed.

Returns
Type Description
System.Boolean
true
if it is the same.
| Improve this Doc View Source

Wait(Int32)

Sets implicit wait timeout in seconds.

Declaration
void Wait(int seconds)
Parameters
Type Name Description
System.Int32 seconds

Maximum timeout duration in seconds.

| Improve this Doc View Source

WaitForElementState(String, ITestingDriver.ElementState, String)

Waits for an element state.

Declaration
void WaitForElementState(string xPath, ITestingDriver.ElementState state, string jsCommand = "")
Parameters
Type Name Description
System.String xPath

The xpath to find the web element.

ITestingDriver.ElementState state

The state of the web element to wait for.

System.String jsCommand

Any js command needed.

| Improve this Doc View Source

WaitForLoadingSpinner()

Waits until the loading spinner disappears.

Declaration
void WaitForLoadingSpinner()
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX