Last active
November 23, 2017 09:20
-
-
Save AnnemarieD/b138b3cff0f569683a0467c8970b262e to your computer and use it in GitHub Desktop.
getText() issue with relevant logs, test and parts of page object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getItems() { | |
// returns 5 elements with the given example test | |
return browser.getText(selector.items); | |
} | |
function getAge() { | |
// returns 6 elements with the given example test | |
return browser.getText(selector.age); | |
} | |
function getAmount() { | |
// returns 6 elements with the given example test | |
return browser.getText(selector.amount); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-15/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-16/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-17/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-18/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-19/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/element/0.5538452207450344-20/text" | |
[09:57:01] DATA {} | |
[09:57:01] COMMAND GET "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c/screenshot" | |
[09:57:01] DATA {} | |
[09:57:01] RESULT "€ 2.466" | |
[09:57:03] RESULT "iVBORw0KGgoAAAANSUhEUgAABLAAAAP7CAIAAADEe+C5AAAgAElEQVR4nOzdf3xT1f0/8Bc05ra0aaspVBZmoZ2lVNb4hQ+ZYKtgpdJMfuQzflTFIkiZPyIqZWrcxMI2M5xx08WplMmoOAtln4idqZZBGa3yWfzATIcl1E8r5UNkhWa2DaW9McHvH0nbtE1/QSvFvJ5 ... (135478 more bytes) | |
[09:57:03] Saved screenshot: ERROR_chrome_2017-11-23T08-57-01.844Z.png | |
[09:57:03] RESULT "€ 6.203" | |
[09:57:03] COMMAND DELETE "/wd/hub/session/38e4968c6add779344bb75bb5131eb2c" | |
[09:57:03] DATA {} | |
------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Test set', () => { | |
it('Test scenario', () => { | |
// Arrange | |
action.login('user'); | |
// Act | |
pageObject.openData(); | |
// Assert | |
const actualName = pageObject.getItems(); | |
const actualPeriods = pageObject.getAge(); | |
const actualAmounts = pageObject.getAmount(); | |
assert.deepEqual(actualName, [ | |
'Name 1', | |
'Name 2', | |
'Name 3', | |
'Name 4', | |
'Name 5' | |
]); | |
assert.deepEqual(actualPeriods, [ | |
'period', | |
'period', | |
'period', | |
'period', | |
'period', | |
'period' | |
]); | |
assert.deepEqual(actualAmounts, [ | |
'€ 1.367', | |
'€ 1.367', | |
'€ 2.427', | |
'€ 2.466', | |
'€ 478', | |
'€ 6.203' | |
]); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment