Closed evilaliv3 closed 8 years ago
@contolini @mgiambalvo : i think we should iterate a little bit on this patch.
what you edited would make the plugin work with >=4.0.10 and only that, since the commit where this api has been changed is the following: https://github.com/angular/protractor/commit/456bc96033ff7f3c8963cce8c52d88cae6495cec
it would be important at least to have an if/else detection of the name of the function so to allow compatibility with boy protractor<4.0.10 and protractor>=4.0.10
@sjelin @juliemr what do you suggest? maybe that it would be worth it to keep retrocompatibility inside protractor in order to not impact on the projects that are still using the old API name? with this github search you can take a look to what is currently impacted: https://github.com/search?utf8=%E2%9C%93&q=browser.executeScript_&type=Code&ref=searchresults
browser.executeScript_
was a private method. We shouldn't have been using it in this plugin, but we do reserve the right to change private APIs as needed.
Your search was a bit broad, it looks like there are only 79 instances of calls to browser.executeScript_
. They all seem to be cases where people have either forked or copied Protractor into their own repo. I don't see any instances of calls to executeScript_
from non-Protractor code.
I'd prefer to just land the patch as is, and make it clear that the next published version of this plugin will require protractor >= 4.0.10. I'm also planning on setting up CI for the official plugins so we can catch issues like this more proactively.
good to go so! waiting for the new package to be issued! :)
For sanity's sake it might be worth having this plugin's versioning sync with protractor's (i.e. bump protractor-accessibility-plugin
's major version to 4 when it starts requiring version 4 of protractor's API).
@sjelin: i see on npm a version 0.2.0 but i do not see this repository having any tag and still presenting the 0.1.1 as declared version in the file package.json.
how is this possible? could you release the package including this fix?
Same issue here.. Do you know the root cause, any update???
"protractor": "^4.0.13",
"protractor-accessibility-plugin": "^0.3.0",
' Executed 9 of 9 specs SUCCESS in 23 secs. [10:11:28] I/plugins - Fail: protractor-accessibility-plugin Plugin Tests [10:11:28] E/plugins - Failure during teardown: unknown error: Cannot read property 'collectIdRefs' of null (Session info: chrome=55.0.2883.95) (Driver info: chromedriver=2.26.436421 (6c1a3ab469ad86fd49c8d97ede4a6b96a49ca5f6),platform=Mac OS X 10.10.5 x86_64) [10:11:28] E/plugins - WebDriverError: unknown error: Cannot read property 'collectIdRefs' of null (Session info: chrome=55.0.2883.95) (Driver info: chromedriver=2.26.436421 (6c1a3ab469ad86fd49c8d97ede4a6b96a49ca5f6),platform=Mac OS X 10.10.5 x86_64) at WebDriverError (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5) at Object.checkLegacyResponse (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:639:15) at parseHttpResponse (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/nodemodules/selenium-webdriver/http/index.js:538:13) at client.send.then.response (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/nodemodules/selenium-webdriver/http/index.js:472:11) at ManagedPromise.invokeCallback (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/nodemodules/selenium-webdriver/lib/promise.js:1379:14) at TaskQueue.execute (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/nodemodules/selenium-webdriver/lib/promise.js:2913:14) at TaskQueue.executeNext (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21) at asyncRun (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25) at /Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: a11y developer tool rules at Driver.schedule (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:377:17) at ProtractorBrowser.executeScriptWithDescription (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/built/browser.js:210:28) at runChromeDevTools (/Users/myuser/Documents/GIT/Join2/node_modules/protractor-accessibility-plugin/index.js:172:18) at Object.teardown (/Users/myuser/Documents/GIT/Join2/node_modules/protractor-accessibility-plugin/index.js:66:17) at resolver (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/built/plugins.js:197:49) at Function.promise (/Users/myuser/Documents/GIT/Join2/node_modules/q/q.js:682:9) at Plugins.safeCallPluginFun (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/built/plugins.js:209:49) at /Users/myuser/Documents/GIT/Join2/node_modules/protractor/built/plugins.js:221:30 at Array.map (native) at Plugins.teardown (/Users/myuser/Documents/GIT/Join2/node_modules/protractor/built/plugins.js:220:18) [10:11:28] I/launcher - 0 instance(s) of WebDriver still running [10:11:28] I/launcher - chrome #01 failed 1 test(s) [10:11:28] I/launcher - overall: 1 failed spec(s) [10:11:28] E/launcher - Process exited with error code 1 '
@FJLopezGarcia whats your protractor.config.js
look like? I'm running into the same problem as you, if I remove my auditConfiguration
for chromeA11YDevTools
everything works, I'm guessing something's changed, I'm working on a fix now.
Here's my current configuration that's breaking:
{
chromeA11YDevTools: {
treatWarningsAsFailures: false,
auditConfiguration: {
auditRulesToRun: [
"audioWithoutControls",
"badAriaAttributeValue",
"badAriaRole",
"imagesWithoutAltText",
"linkWithUnclearPurpose",
"mainRoleOnInappropriateElement",
"nonExistentAriaLabelledbyElement",
"pageWithoutTitle",
"requiredAriaAttributeMissing",
"unfocusableElementsWithOnClick",
"videoWithoutCaptions"
],
auditRulesToSkip: [
"controlsWithoutLabel",
"lowContrastElements",
"elementsWithMeaningfulBackgroundImage",
"focusableElementNotVisibleAndNotAriaHidden"
],
showUnsupportedRulesWarning: false,
// Ignore controls without label on react-select boxes
// Ignore <video> / ticket opened with Adobe to fix
rules_: {
controlsWithoutLabel: {
"ignore": [".Select-control", ".form-control", "video"]
}
}
}
}
While working on GlobaLeaks i just found that the current release of protractor-accessibility-plugin is no more compatible with protractor 4.0.10
\cc @juliemr @sjelin @cnishina