We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I believe that we should use proxy to get status code in selenium driver. Something like browsermob: https://github.com/AutomatedTester/browsermob-proxy-py
The text was updated successfully, but these errors were encountered:
I like the idea, the only downside that I can think of from using browsermob is that it would require more dependencies on the system.
Is there a pure python proxy that could be used?
Sorry, something went wrong.
You could always enable performance logs and parse the log to get the status code
in the capabilities dict
capabilities['loggingPrefs'] = {'performance': 'ALL'}
chrome options
chrome_options.add_experimental_option('perfLoggingPrefs', {"enablePage": True})
def parse_chromedriver_status_code(performance_log)
status_code = None for log in performance_log: try: method = loads(log['message'])['message']['method'] # it'll always be the 1st if method == 'Network.responseReceived': status_code = int(loads(log['message'])['message']['params']['response']['status']) # response_url = loads(log['message'])['message']['params']['response']['url'] break except KeyError: pass return status_code
No branches or pull requests
I believe that we should use proxy to get status code in selenium driver. Something like browsermob: https://github.com/AutomatedTester/browsermob-proxy-py
The text was updated successfully, but these errors were encountered: