How can I get the Request URL from the website using selenium python?

593 views
Skip to first unread message

Sara

unread,
Jun 9, 2016, 9:27:40 AM6/9/16
to Selenium Users
I am trying to get the request url that send from clicking the button in the web page.

There is request sent on button click , i need to verify the request using selenium web driver.

⇜Krishnan Mahadevan⇝

unread,
Jun 9, 2016, 10:34:01 AM6/9/16
to Selenium Users
Saranya,

Selenium doesn't let you tap into requests/responses. Selenium merely lets you interact with your webpage via a browser.

If you would like to intercept requests/responses, then you need a proxy server. BrowserMobProxy is one such proxy server that can be used to intercept requests/responses by injecting it into the web browser as a proxy server and having your web browser route all web traffic via the proxy server.



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Thu, Jun 9, 2016 at 6:49 PM, Sara <sarany...@gmail.com> wrote:
I am trying to get the request url that send from clicking the button in the web page.

There is request sent on button click , i need to verify the request using selenium web driver.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/32116290-958d-4a81-8d94-a962884618a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cristian Bulgaru

unread,
Mar 29, 2020, 11:44:16 PM3/29/20
to Selenium Users
For Python users, I would also add that there is a very practical Python package for this which integrates nicely with Selenium: `selenium-wire`, can be found here https://github.com/wkeeling/selenium-wire.
Reply all
Reply to author
Forward
0 new messages