-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# unable to enable performance logging for ChromeDriver #7335
Comments
related to #7342 CapabilityType.LOGGING_PREFS is not valid for latest versions of Chrome (75+) |
Potential workaround code for C# (until the library is fixed). This will update the value of the preference string as long as it's run before you make use of the options
|
@MatthewSteeples Thanks Matt! That did allow the browser to start. What i'm not sure of now is if that fix is breaking the logs. Up top in my ChromePerformanceOptions object you can see I'm setting my log pref like so |
We're getting the same when trying to retrieve browser logs so it would appear that this isn't a full fix yet. We'll be trying some more things tomorrow, but it may be a case of waiting for 4.0 alpha 2 to hit NuGet |
Trying to follow the conversations around this. I just hit this when my chrome updated to version 76. Are there no workarounds for accessing chrome logs? |
With version 76, Chromedriver Issue 2947 was resolved changing the endpoint to The selenium bindings will be updated accordingly, but you'll need to patch them yourself if you need them now; or use chromedriver 75. |
Scratch that, I believe this should be hitting the correct endpoints for logs in |
|
It should work with chrome 76 |
@lmtierney |
Sorry, re-read things a second time, were you saying to use the following? Selenium.WebDriver: 4.0.0-alpha02 because I just checked my selenium version and I'm using 3.141.0 |
Yes, in order for this all to work, you need 4.0.0-alpha02, Chrome/Chromedriver 76 (or I believe a very late version of 75 had it enabled) |
Is there some kind of tutorial for installing the pre-release? I attempted to install the version from nuget using the package manager console command: Install-Package Selenium.WebDriver -Version 4.0.0-alpha02 But when I looked at the metadata I had version 0.0.0.0 |
JFYI upgrading to Chrome-76/Chromedriver-76 did not help. See the issue referenced #7390 |
Referenced issue #7390 was closed but issue seems to be still not fixed. Any update on this? |
The issue has been resolved but the fix is not (yet) available on NuGet so you'll need to roll your own if you need it before the next release is out |
Hi Guys, I have tried to collect the chrome performance log using latest Selenium 4.0-alpha04 (https://www.nuget.org/packages/Selenium.WebDriver/4.0.0-alpha04) with chrome driver v79. Also renamed the capability loggingPrefs to goog:loggingPrefs, as required by W3C standard. The below C# code samples are not working and throw the error; Code: ChromeOptions options = new ChromeOptions(); Error: OpenQA.Selenium.WebDriverArgumentException: invalid argument: log type 'performance' not found Is that latest fix to enable chrome performance log is available in latest NuGet release? Any update on this? Thanks. |
Hi All, I tried using following code with latest version of Chrome driver (80.0.3987.1699 ) and Selenium Webdriver (4.0-alpha04) but not able to retrieve the performance logs. var perfLogPrefs = new ChromePerformanceLoggingPreferences(); var logs = driver.Manage().Logs.GetLog("performance"); May I know if we have any fix for this please until we get latest version rolled out like registry settings (I know this is not a good idea) changes or so? |
As a follow up, may I know if anyone can help me here pointing to an answer if it is already answered in any of the forums. @MatthewSteeples , may I know what are the changes that we need to make if the solution is not rolled out in nuget packages pls? |
Hi All, With Selenium WebDriver (v4.0.0-alpha04) and Selenium.Chrome.WebDriver (v79.0.0) and using the following code, I am able to retrieve the Chrome performance logs. ChromeOptions options = new ChromeOptions(); //Following helps in setting the logging preference //Based on your need you can change the following options //Creating Chrome driver instance //Extracting the performance logs Hope this helps. |
未将对象引用设置到对象的实例。 ChromeDriver 81.0.4044.69 so thankyou |
I suggest you check the webdriver version (4.0.0-alpha05), you can find it in NuGet (checked 'Include prerelease') |
good job! |
Upgrading to beta version for driver worked for me, thanks @stream1990 |
Closing this as several comments show that it works with recent versions of Selenium. |
Chrome:Version 75.0.3770.100
ChromeDriver:75.0.3770.90
Selenium:3.141.0
I'm getting the error ```
OpenQA.Selenium.WebDriverException: 'invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: perfLoggingPrefs specified, but performance logging was not enabled'
If the work around is to use LoggingPreference, can someone please tell me how to reference it since it does not seem to be in the 3.141.0 dll. Also, I think this might relate to the changes to 75.0.3770.8 Renamed capability loggingPrefs to goog:loggingPrefs, as required by W3C standard
The text was updated successfully, but these errors were encountered: