Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
How to check response in Playwright

I have I question about Playwright. When I make a request to a website with "page.goto("example_url.com")" Using page.on("response", lambda res: print(res.status)) It returns to me more than one response. My question is how do I deal with this kind of situation to determine if the page has responded to me successfully.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

page.goto returns the Response of the page where its navigating to. So you can do something like that:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()

    response = page.goto("http://whatsmyuseragent.org/")
    assert response.ok

    browser.close()
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!