admin管理员组文章数量:1415120
I now get "javascript error: circular reference(Session info: chrome=76.0.3809.100)" whenever I try and click on any element on my pany's webapp.
This is code that was working fine on previous chromedriver versions
I have tried the solutions mentioned in the "Duplicate" question linked to here, to be honest i think that question was marked duplicate erroneously.
Protractor: Version 6.0.0 (also tried on 5.4.2)
webdriver-manager: using global installed version 12.1.6
Selenium server version: 3.141.59
Node: v10.16.2
and obviously chromedriver_76.0.3809.12
the code i am trying to run is here
async function clickElemByID(strID){
await browser.sleep(15000);
var testElem = element(by.id(strID));
try {
await testElem.click();//throws "Failed: javascript error: circular reference"
} catch (e) {
console.log(e);
}
}
the catch block catches:
"JavascriptError: javascript error: circular reference
(Session info: chrome=76.0.3809.100)
at Object.throwDecodedError (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:550:15)
at parseHttpResponse (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:560:13)
at Executor.execute (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:486:26)
at process._tickCallback (internal/process/next_tick.js:68:7)Error
at ElementArrayFinder.applyAction_ (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:29)
at ElementArrayFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:97:29)
at ElementFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:818:22)
at UserContext.it (c:\Users\%username%\Development\test-automation\Repo\Cloud\UK Tax\HMRC Test Cases 2018-19\hmrcTestCase001\spec01.js:173:28)"
This has happened on multiple machines.
Firefox still appears to be working though
I now get "javascript error: circular reference(Session info: chrome=76.0.3809.100)" whenever I try and click on any element on my pany's webapp.
This is code that was working fine on previous chromedriver versions
I have tried the solutions mentioned in the "Duplicate" question linked to here, to be honest i think that question was marked duplicate erroneously.
Protractor: Version 6.0.0 (also tried on 5.4.2)
webdriver-manager: using global installed version 12.1.6
Selenium server version: 3.141.59
Node: v10.16.2
and obviously chromedriver_76.0.3809.12
the code i am trying to run is here
async function clickElemByID(strID){
await browser.sleep(15000);
var testElem = element(by.id(strID));
try {
await testElem.click();//throws "Failed: javascript error: circular reference"
} catch (e) {
console.log(e);
}
}
the catch block catches:
"JavascriptError: javascript error: circular reference
(Session info: chrome=76.0.3809.100)
at Object.throwDecodedError (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:550:15)
at parseHttpResponse (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:560:13)
at Executor.execute (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:486:26)
at process._tickCallback (internal/process/next_tick.js:68:7)Error
at ElementArrayFinder.applyAction_ (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:29)
at ElementArrayFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:97:29)
at ElementFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:818:22)
at UserContext.it (c:\Users\%username%\Development\test-automation\Repo\Cloud\UK Tax\HMRC Test Cases 2018-19\hmrcTestCase001\spec01.js:173:28)"
This has happened on multiple machines.
Firefox still appears to be working though
Share Improve this question asked Aug 14, 2019 at 10:09 JamesHenniganJamesHennigan 1201 silver badge7 bronze badges 04 Answers
Reset to default 4As per Issue 2995: javascript error: circular reference with ChromeDriver Its fixed in Chrome/ChromeDriver version 76.0.3809.68 . Please try with 76.0.3809.68.
Change logs :
ChromeDriver 76.0.3809.68
Supports Chrome version 76
Includes the following changes over version 76.0.3809.25:
Fixed a bug in detecting circular reference in JavaScript objects
Edit
There is issue with 'webdriver-manager' its not downloading the latest build of v76.0.0 . You will have to install it yourself issue - 408
npm install chromedriver --chromedriver_version=LATEST
I am also facing the same problem.
According to my research, this happened from ChromeDriver version 75.0.3770.8. https://sites.google./a/chromium/chromedriver/downloads
ChromeDriver 75.0.3770.8
Supports Chrome version 75
The most noticeable change is ChromeDriver now runs in W3C standard pliant mode by default.
This means, they have enabled W3C standard in the chrome driver. To fix this, either the circular reference error need to be fixed in code or disable W3C. For some disabling W3C worked with the solution from github issue: https://github./angular/protractor/issues/5261
capabilities: {
'goog:chromeOptions': {
w3c: false
}
}
Unfortunately, this solution is not working for me. You can try this as a temporary solution.
Looks like someone has fixed this in webdriver-manager but it hasn't been released yet. I had the same issue and was able to fix it by applying this diff to my local version of webdriver-manager in node_modules: https://github./angular/webdriver-manager/pull/413/mits/6a95aa4187825d1293bda7c802f39257699095fc
Then updating webdriver downloaded the latest version and everything worked.
As mentioned by others there is a issue with 'webdriver-manager' its not downloading the latest build of v76.0.0 . even-though you specify the exact version by giving webdriver-manager update --versions.chrome 76.0.3809.68 it always points to the chrome 76.0.3809.12. only name is changed but the file has chrome 76.0.3809.12 version only i think
and as mentioned by Rahul L
quick fix : install chromedriver through npm - v76.0.1
https://www.npmjs./package/chromedriver
but one catch here is protractor always points to the default chromedriver that es along with the webdriver-manager update ,hence just adding the package alone is not enough ,we have to add some values in the config file to over e this senario , we have to overwrite the chromedriver reference path through the config file with these values
export.Config = {
DirectConnet:true,
chromeDriver: process.cwd()+'/node_modules/chromedriver/lib/chromedriver/chromedriver.exe',
本文标签:
版权声明:本文标题:selenium webdriver - Chromedriver 76 breaks my test suite "javascript error: circular reference" - Stack Overf 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745213823a2648045.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论