Global

Members

name :string

Used when reporting results. If you do not specify this property, it will be filled in with something reasonable (e.g. the plugin's path)
Type:
  • string
Source:

skipAngularStability :boolean

Used to turn off default checks for angular stability Normally Protractor waits for all $timeout and $http calls to be processed before executing the next command. This can be disabled using browser.ignoreSynchronization, but that will also disable any .waitForPromise or .waitForCondition checks. If you want to disable synchronization with angular, but leave in tact any custom plugin synchronization, this is the option for you. This is used by users who want to replace Protractor's synchronization code with their own.
Type:
  • boolean
Source:

winston

Created by 212556710 on 5/3/16.
Source:

winston

Created by 212556710 on 5/3/16.
Source:

Methods

acceptAlert()

Accepts alert dialog box
Source:

alertIsPresent() → {promise}

Expect an alert to be present.
Source:
Returns:
Type
promise

assertEqual(actual, expected, callbackOnError) → {promise}

Assert if expected is equal to actual
Parameters:
Name Type Description
actual
expected
callbackOnError
Source:
Returns:
Type
promise

assertInclude(actual, expected, callbackOnError) → {promise}

Assert if expected is included.
Parameters:
Name Type Description
actual object
expected object
callbackOnError
Source:
Returns:
Type
promise

assertTrue(promise, callbackOnError) → {promise}

Assert if something is True
Parameters:
Name Type Description
promise
callbackOnError
Source:
Returns:
Type
promise

clearFilter(columnName)

Clears filter applied in precised column
Parameters:
Name Type Description
columnName String
Source:

compareData()

compare the data with the data in the file line by line with only the integer part
Source:
Returns:
boolean value if the similarity is over 95% then true, else false

createTestcase(opts, ws/project, callback)

Create a testcase
Parameters:
Name Type Description
opts contains kObject (duration), and tcObject (parent folder id, description, name, user story, owner), and error
ws/project workspace and project of the test case
callback returns the testcase ObjectID
Source:

createTestcaseResult(opts, ws/proj, callback)

Create a testcase result of a given testcase.
Parameters:
Name Type Description
opts contains duration, status, testcase ID, buildnumber
ws/proj workspace and project IDs
callback returns id off the test case result created
Source:

createTestPlan(name, ws, proj, callback)

Create a test folder
Parameters:
Name Type Description
name test folder name from feature file
ws the workspace
proj the project
callback returns the objectID of the newly created test folder
Source:

dismissAlert()

Dismisses alert dialog box
Source:

dragAndDrop(dragPage, dragElement, dropPage, dropElement)

Drags and drops element to specified location. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
dragPage String
dragElement String
dropPage String
dropElement String
Source:

dragAndDrop2(dragPage, dragElement, dropPage, dropElement)

Drags and drops element to specified location. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
dragPage String
dragElement String
dropPage String
dropElement String
Source:

elementToBeClickable(page, elementName) → {promise}

An Expectation for checking an element is visible and enabled such that you can click it. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
elementName string
Source:
Returns:
Type
promise

elementToBeSelected(page, element) → {promise}

Checks to see if element is selected. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page string
element string
Source:
Returns:
Type
promise

executeDeleteRequest(url, headers, callback)

Perform a delete request
Parameters:
Name Type Description
url the end point to perform a delete request
headers http headers
callback callback on error and http response
Source:

executeGetRequest(url, headers, callback)

Perform a get request
Parameters:
Name Type Description
url the end point to perform a get request on
headers http headers
callback callback on error and http response
Source:

executePatchRequest(url, headers, body, callback)

Perform a patch request
Parameters:
Name Type Description
url the end point to perform a post request
headers http headers
body patch request body object
callback callback on error and http response
Source:

executePostRequest(url, headers, body, callback)

Perform a post request
Parameters:
Name Type Description
url the end point to perform a post request
headers http headers
body post request body object
callback callback on error and http response
Source:

executePutRequest(url, headers, body, callback)

Perform a put request
Parameters:
Name Type Description
url the end point to perform a put request
headers http headers
body put request body object
callback callback on error and http response
Source:

geSSOLogin(username, password)

Logs in the GE SSO page. (Default username and password are provided) Parameters are optional
Parameters:
Name Type Description
username String
password String
Source:

getAccessToken(url, headers, body, callback)

An util to get the access_token
Parameters:
Name Type Description
url the url to get the access token
headers http headers
body post request body
callback
Source:

getAttribute(page, element, attribute)

Gets attribute value of specified element. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
element String
attribute String
Source:

getAxisLabels(axis) → {list}

get labels displayed in x-axis or y-axis
Parameters:
Name Type Description
axis
Source:
Returns:
Type
list

getAxisText(index) → {string}

get text displayed in x-axis or y-axis
Parameters:
Name Type Description
index int
Source:
Returns:
Type
string

getAxisTextByIndex(index) → {string}

get text displayed in axis
Parameters:
Name Type Description
index int (1 for x-axis, 2 for y-axis)
Source:
Returns:
Type
string

getBMChartData()

get BM chart data based on the tooltip
Source:
Returns:
the whole data string and also save the data in csv file.

getCellElement(rowNumber, columnNumber) → {String}

Retrieves cell element value for specified row and column
Parameters:
Name Type Description
rowNumber Integer
columnNumber Integer
Source:
Returns:
Type
String

getCellElements() → {String}

Retrieves all cell elements of all table records
Source:
Returns:
Type
String

getCellElementText(cellElement) → {String}

Retrieves text for specified by using cell element value
Parameters:
Name Type Description
cellElement
Source:
Returns:
Type
String

getCellHtml(row, column) → {String}

Retrieves html data for precise cell by using row and column number or index value as input
Parameters:
Name Type Description
row Integer
column Integer
Source:
Returns:
Type
String

getCellText(row, column) → {String}

Retrieves text of precise cell by using row and column number or index value as input
Parameters:
Name Type Description
row Integer
column Integer
Source:
Returns:
Type
String

getChartData()

get apm chart data based on the tooltip
Source:
Returns:
the whole data string and also save the data in csv file.

getChartData()

get highchart data in highchart demo website based on the tooltip
Source:
Returns:
the whole data string and also save the data in csv file.

getColumnCount() → {Integer}

Retrieves the number of columns present in table
Source:
Returns:
Type
Integer

getColumnElementValues(columnName) → {String}

Retrieves all records of specified column
Parameters:
Name Type Description
columnName String
Source:
Returns:
Type
String

getColumnHeaderElements() → {Array}

Retrieves an array of column header elements
Source:
Returns:
Type
Array

getColumnHtmlValues(columnName) → {String}

Retrieves all html values for precise column
Parameters:
Name Type Description
columnName String
Source:
Returns:
Type
String

getColumnindex(columnName) → {Integer}

Retrieves index value of column
Parameters:
Name Type Description
columnName
Source:
Returns:
Type
Integer

getColumnNames() → {String}

Retrieves column names
Source:
Returns:
Type
String

getColumnTextValues(columnName) → {String}

Retrieves all the text value for precise column
Parameters:
Name Type Description
columnName String
Source:
Returns:
Type
String

getContainer() → {object}

get container element
Source:
Returns:
container
Type
object

getContainer() → {String}

Retrieves the value of table container
Source:
Returns:
Type
String

getCssValue(page, element, cssAttribute)

Gets css value of specified element. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
element String
cssAttribute String
Source:

getCurrentPage() → {Integer}

Retrieves the value of the current page number
Source:
Returns:
Type
Integer

getElementManager() → {Object}

Gets the element manager
Source:
Returns:
Type
Object

getFilter(columnName) → {String}

Retrieves filter value of precise column
Parameters:
Name Type Description
columnName String
Source:
Returns:
Type
String

getLegendsFromSection() → {list}

get legends displayed in section (outside svg element)
Source:
Returns:
Type
list

getObjectRef(objType, objName, project/ws, callback)

Get the rally object ref in form of '/[Object]/12345678', e.g. '/testfolder/59651570691'
Parameters:
Name Type Description
objType The object type. e.g. 'project', 'testfodler', 'testcase' etc.
objName The name of the object, e.g. 'QE Automation Engineering'
project/ws The project/workspace specified in .env i.e. 'GE Digital'/'QE Automation Engineering'
callback The object reference of the requested object if found or 'NOT_FOUND' otherwise.
Source:

getOOChartData()

get OO chart data based on the tooltip
Source:
Returns:
the whole data string and also save the data in csv file.

getRandomString() → {String}

Assert if expected is included.
Source:
Returns:
Type
String

getRowCount() → {Integer}

Retrieves the number of rows present in table
Source:
Returns:
Type
Integer

getRowElementValues(rowIndex) → {String}

Retrieves all records of element value of specified row
Parameters:
Name Type Description
rowIndex Integer
Source:
Returns:
Type
String

getRowHtmlValues(rowIndex) → {String}

Retrieves all html values of specified row
Parameters:
Name Type Description
rowIndex Integer
Source:
Returns:
Type
String

getRowPerPageValue() → {Integer}

Retrieves current value of row per page field
Source:
Returns:
Type
Integer

getRowTextValues(rowIndex) → {String}

Retrieves all text value of specified row
Parameters:
Name Type Description
rowIndex Integer
Source:
Returns:
Type
String

getSVG() → {object}

get svg element
Source:
Returns:
svg
Type
object

getText(page, element)

Checks for the element to be present and then gets text. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
element String
Source:

getTooltipInfo()

get the tooltip information for apmhighchart
Source:

getUSTSRef(USTS, ws/proj, callback)

Get a rally user story and test set reference
Parameters:
Name Type Description
USTS the user story. e.g. 'US6400' or testset e.g. 'TS20'
ws/proj the workspace and project the user story belongs to
callback the user story ref in the form of '/hierarchicalrequirement/1234567889'
Source:

getXaxisLabels() → {list}

get labels displayed in x-axis
Source:
Returns:
Type
list

getXaxisText() → {string}

get text displayed in x-axis
Source:
Returns:
Type
string

getYaxisLabels() → {list}

get labels displayed in y-axis
Source:
Returns:
Type
list

getYaxisText() → {string}

get text displayed in y-axis
Source:
Returns:
Type
string

goToNextPage()

Navigates to next page
Source:

goToPage(pageNumber) → {Integer}

Navigates to specified page number
Parameters:
Name Type Description
pageNumber Integer
Source:
Returns:
Type
Integer

goToPreviousPage()

Navigates to previous page
Source:

iFrameSwitch(page, element)

Switches to specific iFrame
Parameters:
Name Type Description
page String
element String
Source:

initialize(sectionElement)

Sets parent element of table
Parameters:
Name Type Description
sectionElement Object
Source:

isChartDisplayed() → {boolean}

check if chart is displayed
Source:
Returns:
Type
boolean

isElementNotPresent(page, ele)

An expectation to check if element is NOT present on the DOM of a page or visible. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String Page of element repository
ele string Element name
Source:
Returns:
promise

isElementPresent(page, ele)

An expectation to check if element is present on the DOM of a page and visible. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String Page of element repository
ele string Element name
Source:
Returns:
promise

isElementVisible(page, elementName)

An expectation to check if element is present on the DOM of a page and visible (same as isElementPresent but returns boolean) **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
elementName string
Source:
Returns:
boolean

noTestCaseFound(tcObj, kObj, callback)

Query User Story, create TestCase, query TestSet, update TestSet, create TestCaseResult
Parameters:
Name Type Description
tcObj object w/ User_Story, resp, j, test_case_name, test_case_description, glb_folder_id, build_num, testset, glb_test_case_id, glb_test_result_id, last_run, glb_i_length, glb_j_length
kObj object w/ duration, status, and response from create test plan
callback callback on error or when reach end of j loop ( test cases )
Source:

noTestFolderFound(tpObj, response, callback)

Create Test Folder, Test Case, & Test Case Result
Parameters:
Name Type Description
tpObj object with TestSet, and length of json file
response Response from Query Test Folders (found, json, i,folderID, test_plan)
callback callback on error or when reach end of j loop ( test cases )
Source:

onPageLoad() → {q.Promise}

This is called inside browser.get() directly after the page loads, and before angular bootstraps.
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, a failed assertion is added to the test results.
Type
q.Promise

onPageStable() → {q.Promise}

This is called inside browser.get() directly after angular is done bootstrapping/synchronizing. If browser.ignoreSynchronization is true, this will not be called.
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, a failed assertion is added to the test results.
Type
q.Promise

postResults() → {q.Promise}

Called after the test results have been finalized and any jobs have been updated (if applicable).
This:
  • {Object}
Source:
Throws:
If this function throws an error, it is outputted to the console
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, an error is logged to the console.
Type
q.Promise

postTest(passed, testInfo) → {q.Promise}

Called after each test block (in Jasmine, this means an `it` block) completes.
This:
  • {Object}
Parameters:
Name Type Description
passed boolean True if the test passed.
testInfo Object information about the test which just ran.
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before outputting test results. Protractor will *not* wait before executing the next test, however. If the promise is rejected, a failed assertion is added to the test results.
Type
q.Promise

scrollIntoView(page, element)

Scrolls until the element is in view. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
element String
Source:

sendKeys(page, element, text)

Checks for the element to be present and then sends keys. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
element String
text String
Source:

setChartElements(sectionElement)

set Chart Elements
Parameters:
Name Type Description
sectionElement object
Source:

setContainer(containerElement)

Sets the value of table container
Parameters:
Name Type Description
containerElement Object
Source:

setContianer(containerElement)

set container element
Parameters:
Name Type Description
containerElement object
Source:

setElementManager(eM)

Sets the element manager
Parameters:
Name Type Description
eM Object
Source:

setFilter(columName, filterValue)

Applies filter in precise column
Parameters:
Name Type Description
columName String
filterValue Integer
Source:

setRowPerPageValue(selectValue)

Sets value of row per page field
Parameters:
Name Type Description
selectValue Integer
Source:

setSVG(svgElement)

set svg element
Parameters:
Name Type Description
svgElement object
Source:

setup() → {q.Promise}

Sets up plugins before tests are run. This is called after the WebDriver session has been started, but before the test framework has been set up.
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, a failed assertion is added to the test results.
Type
q.Promise

sortColumn(columnName)

Applies sorting in specified column
Parameters:
Name Type Description
columnName String
Source:

teardown() → {q.Promise}

This is called after the tests have been run, but before the WebDriver session has been terminated.
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, a failed assertion is added to the test results.
Type
q.Promise

TestCaseFound(tcObj, callback)

Query Revision History, User Story, TestSet, calls methods TestCaseResult
Parameters:
Name Type Description
tcObj object w/ User_Story, resp, j, test_case_name, test_case_description, glb_folder_id, build_num, testset, glb_test_case_id, glb_test_result_id, last_run, glb_i_length, glb_j_length
callback callback on error or when reach end of j loop ( test cases )
Source:

TestCaseResult(tcObj, callback)

Update Test Case Result, Create Test Case Result, or EOF
Parameters:
Name Type Description
tcObj object w/ User_Story, resp, j, test_case_name, test_case_description, glb_folder_id, build_num, testset, glb_test_case_id, glb_test_result_id, last_run, glb_i_length, glb_j_length
callback callback on error or when reach end of j loop ( test cases )
Source:

TestFolderFound(tpObj, response, callback)

Query Test Cases - contains method to call TestCaseFound and noTestCaseFound
Parameters:
Name Type Description
tpObj object with TestSet, and length of json file
response Response from Query Test Folders (found, json, i,folderID, test_plan)
callback callback on error or when reach end of j loop ( test cases )
Source:

textToBePresentInElement(page, elementName, text) → {promise}

An expectation for checking if the given text is present in the element. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
elementName string
text string
Source:
Returns:
Type
promise

textToBePresentInElementValue(page, elementName, text) → {promise}

An expectation for checking if the given text is present in the element’s value. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String
elementName string
text string
Source:
Returns:
Type
promise

titleContains(text) → {promise}

An expectation for checking that the title contains a case-sensitive substring.
Parameters:
Name Type Description
text string
Source:
Returns:
Type
promise

titleIs(text) → {promise}

An expectation for checking the title of a page.
Parameters:
Name Type Description
text string
Source:
Returns:
Type
promise

updateTestCase(opts, ws, callback)

Update the testcase of a given testcase.
Parameters:
Name Type Description
opts
ws
callback
Source:

updateTestCaseResult(opts, ws, callback)

Update the result of a given testcase.
Parameters:
Name Type Description
opts
ws
callback
Source:

updateTestSet(tcObj, resp, callback)

Update Test Set to add test case
Parameters:
Name Type Description
tcObj object w/ User_Story, resp, j, test_case_name, test_case_description, glb_folder_id, build_num, testset, glb_test_case_id, glb_test_result_id, last_run, glb_i_length, glb_j_length
resp resonse from query TestSet
callback callback on error and http response
Source:

uploadFile(filePath)

Uploads file in upload dialog box
Parameters:
Name Type Description
filePath String
Source:

UserPermissions(type, object, callback)

Get the rally User permissions (workspace/projects able to edit), and owner ID information
Parameters:
Name Type Description
type The object type - only 2 used: 'workspace' and 'project'
object The name of the object, e.g. 'QE Automation Engineering'
callback The object reference of the requested object if found or 'NOT_FOUND' otherwise.
Source:

waitForAngular()

Waits for all the angular content to load on the page
Source:

waitForCondition() → {q.Promise.<boolean>|boolean}

Between every webdriver action, Protractor calls browser.waitForAngular() to make sure that Angular has no outstanding $http or $timeout calls. You can use waitForCondition() to have Protractor additionally wait for your custom condition to be truthy.
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
If truthy, Protractor will continue onto the next command. If falsy, webdriver will continuously re-run this function until it is truthy. If a rejected promise is returned, a failed assertion is added to the test results, and protractor will continue onto the next command.
Type
q.Promise.<boolean> | boolean

waitForElementToDisappear(page, ele)

An expectation to check until element disappears. **Can also provide element directly instead of the page,element of element repo**
Parameters:
Name Type Description
page String Page of element repository
ele string Element name
Source:
Returns:
promise

waitForPromise() → {q.Promise}

Between every webdriver action, Protractor calls browser.waitForAngular() to make sure that Angular has no outstanding $http or $timeout calls. You can use waitForPromise() to have Protractor additionally wait for your custom promise to be resolved inside of browser.waitForAngular().
This:
  • {Object}
Source:
Throws:
If this function throws an error, a failed assertion is added to the test results.
Type
*
Returns:
Can return a promise, in which case protractor will wait for the promise to resolve before continuing. If the promise is rejected, a failed assertion is added to the test results, and protractor will continue onto the next command. If nothing is returned or something other than a promise is returned, protractor will continue onto the next command.
Type
q.Promise