Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Requests not being captured #702

Open
awilz10xp opened this issue Aug 10, 2023 · 2 comments
Open

Requests not being captured #702

awilz10xp opened this issue Aug 10, 2023 · 2 comments

Comments

@awilz10xp
Copy link

awilz10xp commented Aug 10, 2023

Doing the most basic operations with selenium-wire and the requests array always lists as empty. I'm guessing there's an unsupported library installed but not sure how to ensure compatibility

VS Code 1.81.1
chromedriver 115.0.5790.170
python 3.10.11
selenium 4.11.2
selenium-wire 5.1.0

test.py ------

from seleniumwire import webdriver

driver = webdriver.Chrome()

driver.get('https://www.google.com/')

for request in driver.requests:
if request.response:
print(
request.url,
request.response.status_code,
request.response.headers['Content-Type']
)

Chrome opens and navigates to google then closes

@awilz10xp awilz10xp reopened this Aug 10, 2023
@awilz10xp
Copy link
Author

I slightly modified it with the same results ... added the console output. Any advice would be greatly appreciated.

if True:
driver.get("https://www.google.com/")
time.sleep(5)
print(driver.requests)
driver.quit()

DevTools listening on ws://127.0.0.1:56700/devtools/browser/95763f06-399c-4055-ab0b-324666c91e1a
[]

@PatrickAlliander
Copy link

I've never used it like that. I always used the interceptor functionality as described here. Did your request to google actually finish?

My current code base is a bit dated due to temporary shifted priorities (it will shift back to add selenium-wire intercept chrome stuff soon).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants