1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>JSDoc: Source: GeneralHook.js</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"> </script>
|
8 | <script src="scripts/prettify/lang-css.js"> </script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
14 | </head>
|
15 |
|
16 | <body>
|
17 |
|
18 | <div id="main">
|
19 |
|
20 | <h1 class="page-title">Source: GeneralHook.js</h1>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | <section>
|
28 | <article>
|
29 | <pre class="prettyprint source linenums"><code>/**
|
30 | * Created by 212556710 on 5/2/16.
|
31 | */
|
32 | /**
|
33 | * Sets up plugins before tests are run. This is called after the WebDriver
|
34 | * session has been started, but before the test framework has been set up.
|
35 | *
|
36 | * @this {Object} bound to module.exports
|
37 | *
|
38 | * @throws {*} If this function throws an error, a failed assertion is added to
|
39 | * the test results.
|
40 | *
|
41 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
42 | * for the promise to resolve before continuing. If the promise is
|
43 | * rejected, a failed assertion is added to the test results.
|
44 | */
|
45 | exports.setup = function() {}
|
46 |
|
47 | /**
|
48 | * This is called after the tests have been run, but before the WebDriver
|
49 | * session has been terminated.
|
50 | *
|
51 | * @this {Object} bound to module.exports
|
52 | *
|
53 | * @throws {*} If this function throws an error, a failed assertion is added to
|
54 | * the test results.
|
55 | *
|
56 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
57 | * for the promise to resolve before continuing. If the promise is
|
58 | * rejected, a failed assertion is added to the test results.
|
59 | */
|
60 | exports.teardown = function() {
|
61 | //--------------------------------------------------------------------
|
62 | // Generating Report in JSON format
|
63 | //--------------------------------------------------------------------
|
64 | //require('./Reporter.js');
|
65 | //--------------------------------------------------------------------
|
66 | // Converting JSON Report into HTML format
|
67 | //--------------------------------------------------------------------
|
68 |
|
69 | var exec = require('child_process').exec, child;
|
70 |
|
71 | child = exec("java -jar ./node_modules/proui-utils/cucumber-sandwich.jar -f Reports/json_report/ -o Reports/html_report -n",
|
72 | function (error, stdout, stderr) {
|
73 | //&& sed -i '' 's/max-width: 250px/max-width: 1000px/g' ./Reports/html_report/cucumber-html-reports/regression.html
|
74 | console.log('stdout: ' + stdout);
|
75 | console.log('stderr: ' + stderr);
|
76 | if (error !== null) {
|
77 | console.log('exec error: ' + error);
|
78 | }
|
79 | });
|
80 |
|
81 | };
|
82 |
|
83 | /**
|
84 | * Called after the test results have been finalized and any jobs have been
|
85 | * updated (if applicable).
|
86 | *
|
87 | * @this {Object} bound to module.exports
|
88 | *
|
89 | * @throws {*} If this function throws an error, it is outputted to the console
|
90 | *
|
91 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
92 | * for the promise to resolve before continuing. If the promise is
|
93 | * rejected, an error is logged to the console.
|
94 | */
|
95 | exports.postResults = function() {
|
96 | };
|
97 |
|
98 | /**
|
99 | * Called after each test block (in Jasmine, this means an `it` block)
|
100 | * completes.
|
101 | *
|
102 | * @param {boolean} passed True if the test passed.
|
103 | * @param {Object} testInfo information about the test which just ran.
|
104 | *
|
105 | * @this {Object} bound to module.exports
|
106 | *
|
107 | * @throws {*} If this function throws an error, a failed assertion is added to
|
108 | * the test results.
|
109 | *
|
110 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
111 | * for the promise to resolve before outputting test results. Protractor
|
112 | * will *not* wait before executing the next test, however. If the promise
|
113 | * is rejected, a failed assertion is added to the test results.
|
114 | */
|
115 | exports.postTest = function(passed, testInfo) {};
|
116 |
|
117 | /**
|
118 | * This is called inside browser.get() directly after the page loads, and before
|
119 | * angular bootstraps.
|
120 | *
|
121 | * @this {Object} bound to module.exports
|
122 | *
|
123 | * @throws {*} If this function throws an error, a failed assertion is added to
|
124 | * the test results.
|
125 | *
|
126 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
127 | * for the promise to resolve before continuing. If the promise is
|
128 | * rejected, a failed assertion is added to the test results.
|
129 | */
|
130 | exports.onPageLoad = function() {};
|
131 |
|
132 | /**
|
133 | * This is called inside browser.get() directly after angular is done
|
134 | * bootstrapping/synchronizing. If browser.ignoreSynchronization is true, this
|
135 | * will not be called.
|
136 | *
|
137 | * @this {Object} bound to module.exports
|
138 | *
|
139 | * @throws {*} If this function throws an error, a failed assertion is added to
|
140 | * the test results.
|
141 | *
|
142 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
143 | * for the promise to resolve before continuing. If the promise is
|
144 | * rejected, a failed assertion is added to the test results.
|
145 | */
|
146 | exports.onPageStable = function() {
|
147 |
|
148 | };
|
149 |
|
150 | /**
|
151 | * Between every webdriver action, Protractor calls browser.waitForAngular() to
|
152 | * make sure that Angular has no outstanding $http or $timeout calls.
|
153 | * You can use waitForPromise() to have Protractor additionally wait for your
|
154 | * custom promise to be resolved inside of browser.waitForAngular().
|
155 | *
|
156 | * @this {Object} bound to module.exports
|
157 | *
|
158 | * @throws {*} If this function throws an error, a failed assertion is added to
|
159 | * the test results.
|
160 | *
|
161 | * @return {q.Promise=} Can return a promise, in which case protractor will wait
|
162 | * for the promise to resolve before continuing. If the promise is
|
163 | * rejected, a failed assertion is added to the test results, and protractor
|
164 | * will continue onto the next command. If nothing is returned or something
|
165 | * other than a promise is returned, protractor will continue onto the next
|
166 | * command.
|
167 | */
|
168 | exports.waitForPromise = function() {};
|
169 |
|
170 | /**
|
171 | * Between every webdriver action, Protractor calls browser.waitForAngular() to
|
172 | * make sure that Angular has no outstanding $http or $timeout calls.
|
173 | * You can use waitForCondition() to have Protractor additionally wait for your
|
174 | * custom condition to be truthy.
|
175 | *
|
176 | * @this {Object} bound to module.exports
|
177 | *
|
178 | * @throws {*} If this function throws an error, a failed assertion is added to
|
179 | * the test results.
|
180 | *
|
181 | * @return {q.Promise<boolean>|boolean} If truthy, Protractor will continue onto
|
182 | * the next command. If falsy, webdriver will continuously re-run this
|
183 | * function until it is truthy. If a rejected promise is returned, a failed
|
184 | * assertion is added to the test results, and protractor will continue onto
|
185 | * the next command.
|
186 | */
|
187 | exports.waitForCondition = function() {};
|
188 |
|
189 | /**
|
190 | * Used when reporting results.
|
191 | *
|
192 | * If you do not specify this property, it will be filled in with something
|
193 | * reasonable (e.g. the plugin's path)
|
194 | *
|
195 | * @type {string}
|
196 | */
|
197 | exports.name = '';
|
198 |
|
199 |
|
200 | /**
|
201 | * Used to turn off default checks for angular stability
|
202 | *
|
203 | * Normally Protractor waits for all $timeout and $http calls to be processed
|
204 | * before executing the next command. This can be disabled using
|
205 | * browser.ignoreSynchronization, but that will also disable any
|
206 | * <Plugin>.waitForPromise or <Plugin>.waitForCondition checks. If you want to
|
207 | * disable synchronization with angular, but leave in tact any custom plugin
|
208 | * synchronization, this is the option for you.
|
209 | *
|
210 | * This is used by users who want to replace Protractor's synchronization code
|
211 | * with their own.
|
212 | *
|
213 | * @type {boolean}
|
214 | */
|
215 | exports.skipAngularStability</code></pre>
|
216 | </article>
|
217 | </section>
|
218 |
|
219 |
|
220 |
|
221 |
|
222 | </div>
|
223 |
|
224 | <nav>
|
225 | <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="HighChart.html">HighChart</a></li><li><a href="PxDataTable.html">PxDataTable</a></li><li><a href="RestHelper.html">RestHelper</a></li><li><a href="TestHelper.html">TestHelper</a></li></ul><h3>Global</h3><ul><li><a href="global.html#acceptAlert">acceptAlert</a></li><li><a href="global.html#alertIsPresent">alertIsPresent</a></li><li><a href="global.html#assertEqual">assertEqual</a></li><li><a href="global.html#assertInclude">assertInclude</a></li><li><a href="global.html#assertTrue">assertTrue</a></li><li><a href="global.html#clearFilter">clearFilter</a></li><li><a href="global.html#compareData">compareData</a></li><li><a href="global.html#createTestcase">createTestcase</a></li><li><a href="global.html#createTestcaseResult">createTestcaseResult</a></li><li><a href="global.html#createTestPlan">createTestPlan</a></li><li><a href="global.html#dismissAlert">dismissAlert</a></li><li><a href="global.html#dragAndDrop">dragAndDrop</a></li><li><a href="global.html#dragAndDrop2">dragAndDrop2</a></li><li><a href="global.html#elementToBeClickable">elementToBeClickable</a></li><li><a href="global.html#elementToBeSelected">elementToBeSelected</a></li><li><a href="global.html#executeDeleteRequest">executeDeleteRequest</a></li><li><a href="global.html#executeGetRequest">executeGetRequest</a></li><li><a href="global.html#executePatchRequest">executePatchRequest</a></li><li><a href="global.html#executePostRequest">executePostRequest</a></li><li><a href="global.html#executePutRequest">executePutRequest</a></li><li><a href="global.html#geSSOLogin">geSSOLogin</a></li><li><a href="global.html#getAccessToken">getAccessToken</a></li><li><a href="global.html#getAttribute">getAttribute</a></li><li><a href="global.html#getAxisLabels">getAxisLabels</a></li><li><a href="global.html#getAxisText">getAxisText</a></li><li><a href="global.html#getAxisTextByIndex">getAxisTextByIndex</a></li><li><a href="global.html#getBMChartData">getBMChartData</a></li><li><a href="global.html#getCellElement">getCellElement</a></li><li><a href="global.html#getCellElements">getCellElements</a></li><li><a href="global.html#getCellElementText">getCellElementText</a></li><li><a href="global.html#getCellHtml">getCellHtml</a></li><li><a href="global.html#getCellText">getCellText</a></li><li><a href="global.html#getChartData">getChartData</a></li><li><a href="global.html#getColumnCount">getColumnCount</a></li><li><a href="global.html#getColumnElementValues">getColumnElementValues</a></li><li><a href="global.html#getColumnHeaderElements">getColumnHeaderElements</a></li><li><a href="global.html#getColumnHtmlValues">getColumnHtmlValues</a></li><li><a href="global.html#getColumnindex">getColumnindex</a></li><li><a href="global.html#getColumnNames">getColumnNames</a></li><li><a href="global.html#getColumnTextValues">getColumnTextValues</a></li><li><a href="global.html#getContainer">getContainer</a></li><li><a href="global.html#getCssValue">getCssValue</a></li><li><a href="global.html#getCurrentPage">getCurrentPage</a></li><li><a href="global.html#getElementManager">getElementManager</a></li><li><a href="global.html#getFilter">getFilter</a></li><li><a href="global.html#getLegendsFromSection">getLegendsFromSection</a></li><li><a href="global.html#getObjectRef">getObjectRef</a></li><li><a href="global.html#getOOChartData">getOOChartData</a></li><li><a href="global.html#getRandomString">getRandomString</a></li><li><a href="global.html#getRowCount">getRowCount</a></li><li><a href="global.html#getRowElementValues">getRowElementValues</a></li><li><a href="global.html#getRowHtmlValues">getRowHtmlValues</a></li><li><a href="global.html#getRowPerPageValue">getRowPerPageValue</a></li><li><a href="global.html#getRowTextValues">getRowTextValues</a></li><li><a href="global.html#getSVG">getSVG</a></li><li><a href="global.html#getText">getText</a></li><li><a href="global.html#getTooltipInfo">getTooltipInfo</a></li><li><a href="global.html#getUSTSRef">getUSTSRef</a></li><li><a href="global.html#getXaxisLabels">getXaxisLabels</a></li><li><a href="global.html#getXaxisText">getXaxisText</a></li><li><a href="global.html#getYaxisLabels">getYaxisLabels</a></li><li><a href="global.html#getYaxisText">getYaxisText</a></li><li><a href="global.html#goToNextPage">goToNextPage</a></li><li><a href="global.html#goToPage">goToPage</a></li><li><a href="global.html#goToPreviousPage">goToPreviousPage</a></li><li><a href="global.html#iFrameSwitch">iFrameSwitch</a></li><li><a href="global.html#initialize">initialize</a></li><li><a href="global.html#isChartDisplayed">isChartDisplayed</a></li><li><a href="global.html#isElementNotPresent">isElementNotPresent</a></li><li><a href="global.html#isElementPresent">isElementPresent</a></li><li><a href="global.html#isElementVisible">isElementVisible</a></li><li><a href="global.html#name">name</a></li><li><a href="global.html#noTestCaseFound">noTestCaseFound</a></li><li><a href="global.html#noTestFolderFound">noTestFolderFound</a></li><li><a href="global.html#onPageLoad">onPageLoad</a></li><li><a href="global.html#onPageStable">onPageStable</a></li><li><a href="global.html#postResults">postResults</a></li><li><a href="global.html#postTest">postTest</a></li><li><a href="global.html#scrollIntoView">scrollIntoView</a></li><li><a href="global.html#sendKeys">sendKeys</a></li><li><a href="global.html#setChartElements">setChartElements</a></li><li><a href="global.html#setContainer">setContainer</a></li><li><a href="global.html#setContianer">setContianer</a></li><li><a href="global.html#setElementManager">setElementManager</a></li><li><a href="global.html#setFilter">setFilter</a></li><li><a href="global.html#setRowPerPageValue">setRowPerPageValue</a></li><li><a href="global.html#setSVG">setSVG</a></li><li><a href="global.html#setup">setup</a></li><li><a href="global.html#skipAngularStability">skipAngularStability</a></li><li><a href="global.html#sortColumn">sortColumn</a></li><li><a href="global.html#teardown">teardown</a></li><li><a href="global.html#TestCaseFound">TestCaseFound</a></li><li><a href="global.html#TestCaseResult">TestCaseResult</a></li><li><a href="global.html#TestFolderFound">TestFolderFound</a></li><li><a href="global.html#textToBePresentInElement">textToBePresentInElement</a></li><li><a href="global.html#textToBePresentInElementValue">textToBePresentInElementValue</a></li><li><a href="global.html#titleContains">titleContains</a></li><li><a href="global.html#titleIs">titleIs</a></li><li><a href="global.html#updateTestCase">updateTestCase</a></li><li><a href="global.html#updateTestCaseResult">updateTestCaseResult</a></li><li><a href="global.html#updateTestSet">updateTestSet</a></li><li><a href="global.html#uploadFile">uploadFile</a></li><li><a href="global.html#UserPermissions">UserPermissions</a></li><li><a href="global.html#waitForAngular">waitForAngular</a></li><li><a href="global.html#waitForCondition">waitForCondition</a></li><li><a href="global.html#waitForElementToDisappear">waitForElementToDisappear</a></li><li><a href="global.html#waitForPromise">waitForPromise</a></li><li><a href="global.html#winston">winston</a></li></ul>
|
226 | </nav>
|
227 |
|
228 | <br class="clear">
|
229 |
|
230 | <footer>
|
231 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.1</a> on Mon Oct 30 2017 11:31:46 GMT-0700 (PDT)
|
232 | </footer>
|
233 |
|
234 | <script> prettyPrint(); </script>
|
235 | <script src="scripts/linenumber.js"> </script>
|
236 | </body>
|
237 | </html>
|