How to get status code by using selenium.py (python code)

0 votes
I am writing a selenium script using python, but I think I don't see any information about - How to get HTTP status code from selenium Python code.

Kindly let me know if anyone knows about it
Aug 16, 2018 in Selenium by Martin
• 4,220 points
743 views

1 answer to this question.

0 votes

Unfortunately, Selenium does not provide this information by design. There is a very lengthy discussion about this, but the short of it is that:

  1. Selenium is a browser emulation tool, not necessarily a testing tool.
  2. Selenium performs many GETs and POSTs during the process of rendering a page and adding an interface for that would complicate the API in ways the authors resist
answered Aug 16, 2018 by Meci Matt
• 9,420 points

Related Questions In Selenium

0 votes
2 answers

How to get HTML Source of WebElement in Selenium WebDriver using Python?

You can read innerHTML attribute to get source of ...READ MORE

answered Jun 13, 2018 in Selenium by Samarpit
• 5,130 points
13,958 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
589 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
899 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
576 views
0 votes
1 answer

How do I get current URL in Selenium Webdriver using Python?

Use current_url element. Example: print browser.current_url READ MORE

answered Aug 8, 2018 in Selenium by Meci Matt
• 9,420 points
5,709 views