Closed JanuLakshmanan closed 3 years ago
Are you able to post the code you're using to create the webdriver?
from seleniumwire import webdriver
driver = webdriver.Chrome()
driver.get('http://localhost:3000/#/')
requests
attributefor request in driver.requests: if request.response: print( request.url, request.response.status_code, request.response.headers['Content-Type'] )
This is the code snippet .But here it didn't print any requests of that given URL
I'm experiencing the same problem. It's capturing requests from remote apps, but when I try to run it on localhost
(or 127.0.0.1
) nothing gets captured.
Selenium Wire instructs the browser not to bypass localhost addresses, but it could be that your browser or system proxy configuration is set up to override that. If you open your system proxy settings (on Windows search for "proxy" from the Start menu), can you see if there is an entry for localhost anywhere?
@JanuLakshmanan I managed to fix that problem by adding this:
options = webdriver.ChromeOptions()
options.add_argument("proxy-bypass-list=<-loopback>")
driver = webdriver.Chrome(options=options)
I found this solution in one of the previous issues: https://github.com/wkeeling/selenium-wire/issues/157
Good catch @pastDexter . Must add that as part of the next release.
I tried to capture the requests of an application running in my xampp server. But nothing gets captured.
URL : http://localhost:3000/#/
Whether Do i need to specify any options in driver ? Help me out!