Open sumxyz opened 5 years ago
This stack overflow thread has a work around for webdriver with java. Is there a way to recreate the same functionality for Protractor?
Could really use some help with this issue. Thank you.
Hi @sumxyz , the same capability works for chrome 74, it doesn't work with 75. It seems like an issue with chrome driver, not really an webdriver-manager issue.
For workaround you can uninstall webdriver-manager@12.1.5 and use webdriver-manager@12.1.4 to make your existing script to work.
Thanks.
@Harsha509 In that stack overflow thread I posted the poster suggests the change was made in chromedriver to comply with the w3c standards more strictly. If that is the case this is unlikely to change back so shouldn't this new functionality be handled by Protractor?
@DublinDev , i have seen the post just now, thanks a lot for your research. Yes it should be handled by protractor and a user working with protractor@5.4.2 should install webdriver-manager@12.1.4 instead of 12.1.5.
It might work with protractor@6.x.x, as it has selenium4-alpha, which follows w3c protocol. For now, yes it is an issue for people working with protractor@5.4.2 and chrome version 75.
Hi - I am using chrome 76 and chromedriver 77, so your milage may vary, but adding the w3c flag (to false) in capabilities is required to access the performance log type.
Those log types are hidden behind that flag due to w3c compliance issues. It likely is the case in the slightly older driver version you are using.
capabilities: { browserName: 'chrome', loggingPrefs: { browser: 'ALL', driver: 'ALL', performance: 'ALL', }, 'goog:chromeOptions': { args: ['disable-infobars'], perfLoggingPrefs: { enableNetwork: true, }, w3c: false, }, elementScrollBehavior: 1, };
@JosephBittman that seems to solve the issue for me anyway! thanks.
Also @Harsha509 I didn't actually mean to imply that that was my answer or research, I just found the thread on stackoverflow.
thank you ... protractor@5.4.2 with webdriver-manager@12.1.4 instead of 12.1.5. helped!
@JosephBittman Hi - I am using chrome 79 ,how to reslove the problem!!! selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: log type 'performance' not found
webdriver-manager 12.1.5
protractor Version 5.4.2
Chrome version 75.0.3770.100
browser.manage().logs().get('performance');
This used to work fine before upgrading my webdriver-manager and protractor version.
If I comment the browser.manage().logs().get('performance'); and other performance related code, then the test runs fine.
webdriver-manager logs show:
Starting ChromeDriver 75.0.3770.90 on port 12268