0

I am making a web application with Django-Gunicorn-Nginx. It is a kind of closed community. Therefore at the start of sign-up, authentication by the third-party server is required. Because the third-party server does not provide official auth API, I'm trying to implement module by my self with python selenium.

I have built the module in a python file in Django accounts app directory. When I test the module with the terminal by python3 somemodulename.py, it works perfectly. However, when I import the module(which is a function) in view.py of the accounts app and test with browser, at some point, the third-party app throws an invalid session message. It never happened when I test exactly the same function with the terminal.

So, if there is any way to catch HTTP request that selenium chrome web driver sends, I would like to compare both cases for debugging. How could one get the full HTTP request of Chrome web driver with python selenium, without interfering the process of code?

I am sorry that I could not append the actual code because of the security issue.

1 Answer 1

1

Unfortunately, this is not possible using Selenium APIs. A long and boring discussion on why can be found here.

However, there are few workarounds, for example, you can try capturing it using the browser logs. A good example of how to do it is discussed here: How to get HTTP Response Code using Selenium WebDriver.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.