How To Get The Response Status Code With Selenium?
As a newbie, I wonder whether there is a method to get the http response status code to judge some expections, like remote server down, url broken, url redirect, etc...
Solution 1:
In Selenium it's Not Possible!
For more info click here.
You can accomplish it with request
:
import requests
from selenium import webdriver
driver = webdriver.get("url")
r = requests.get("url")
print(r.status_code)
Post a Comment for "How To Get The Response Status Code With Selenium?"