I am writing a selenium script by python, but I think I don\'t see any information about:
How to get http status code from selenium Python code.
I've been surfing the net for about 3 hours and I found not a single way to do that with web-driver. I'v not ever worked with selenium directly. The only suggestion that came in my mind is to use module "requests" like this:
import requests
from selenium import webdriver
driver = webdriver.get("url")
r = requests.get("url")
print r.status_code
Complete tutorial about using requests is here and you can install the module using the command pip install requests.
But there is a problem that may not always happen, but you should focus that driver's response and request's response are not the same; so you just get the request's status code and if the url responses are not stable it probably causes wrong results.