Could a log like this actually exist?
07-<...>.js
...
Stacktrace: [31m[31mError: Failed expectation[31m
[31m at [object Object].<anonymous> (...06-....js)[31m[31m[22m[39m
It seems that something is failing in file -06- while I am processing file -07- within a suite.
Is there a way to tell Protractor / webdriver.js not to wait for previous promises to be resolved? I doubt it, but perhaps there is a specific scenario where this can occur.
I apologize for the limited information provided. Unfortunately, I cannot share more details at this time.
This issue seems to be related to a previous one:
[32m46 tests, 11 assertions, 0 failures
[39m
[launcher] BUG: launcher exited with 1 tasks remaining
Additionally, there is another instance where an error stack trace appears after the tests, assertions, and failures line. For example:
032 - "alert.msg" equals text: "invalid login"[32m✔[39m 033 - set detailTestLevel: 1
Finished in 3 seconds. Speed: 12.89 tests per second
Last Test Id: (ch_loginvalid_enUS_122_01)
[32m33 tests, 0 assertions, 0 failures
[39m
sh: 1: beep: not found
/home/*******/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654
var result = fn();
^
Error: Index out of bound. Trying to access element at index:0, but there are only 0 elements
at /home/*******/common/ext/ElementFinder.js:618:15
...
(The error continues with additional stack traces)
Can you foresee a scenario where this might occur?
Protractor version: 1.7
Node version: 0.10.25
The code segment around ElementFinder:512 is shown below:
ElementFinder.prototype.itEqualsText = function(name, text) {
if (_.isNully(text)) { text = name; name = this.originalName; };
var elm = this; name = name || this.originalName;
if (_.isNully(name)) throw new Error('needs name');
if (_.isNully(text)) throw new Error('needs text');
... (Code continuation)
The code surrounding ElementFinder:618 looks like this:
// Fix current Protractor implementation so it keeps a reference to the
// original index as it was on previous Protractor versions: i.e. <= 1.2.0
ElementArrayFinder.prototype.get = function(index) {
... (Code details)
I inherited this codebase, so my understanding may not be complete. It appears to involve retrieving an array index from element.all("...").get(x).