Comments (5)
it could return the fetch response
object for the main resource
from puppeteer.
Today, 'page.navigate' waits for the load
event to fire. We might need an option to wait for DOMContentLoaded
instead, though I don't know a scenario where this is useful.
from puppeteer.
example.com returns status 200 for all paths, so that non-existing-page case won't work. Is the idea to return false for non-200 status codes? I feel like the true/false should be whether or not the current page was rendered with data from that url. So 403/404/200 would be true, but timeout/brokenssl would be false.
from puppeteer.
Rather than false
, to me it seems better to reject with an Error
with a more descriptive message.
from puppeteer.
So the issue with returning true
/false
is that it's hard to decide what is a success and what is a failure. For example, navigating to a 404 page might be a valid scenario, since a lot of websites have their own custom-made 404's.
How about:
- we consider navigation failed if there's a navigation timeout or an interstitial
- anything else returns a status code for the main resource
This should address both @JoelEinbinder and @paulirish concerns. What do you guys think?
from puppeteer.
Related Issues (20)
- [Bug]: Redirection is not followed and directly breaks page and execution context HOT 8
- How to use XPath to find elements in latest puppeteer-core๏ผ HOT 1
- [Bug]: libdrm.so.2: cannot open shared object file: No such file or directory HOT 1
- "page.waitForXPath is not a function" in 22.10.0 HOT 1
- [Bug]: Regression CDP/BiDi when serializing a typed array HOT 8
- [Bug]: Docker errors HOT 2
- [Bug]: Chrome settings policy does not work HOT 3
- [Bug]: Unable to Screenshot Blocked GraphQL Result Page HOT 4
- [Bug]: Headless can't read LocalStorage written from Headful `DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.` HOT 5
- Investigate "[requestinterception.spec] request interception Page.setRequestInterception should work with redirects for subresources" HOT 1
- [Feature]: Support for getByTitle and getByLabel locator HOT 1
- [Bug]: Setting long viewport and then taking screenshot sometimes generates incorrectly rendered screenshots HOT 3
- [Feature]: Puppeteer detection HOT 1
- How can I capture event in browser (include web page and browser UI (close/open tab, click extension, click setting ...) HOT 1
- Console does not work on addEventListener
- [Bug]: x1.5 CPU usage increase using Puppeteer between 20.8.3 to 20.9.0+ HOT 8
- [Bug]: image is cutting during screenshot HOT 2
- [Bug]: smoke tests fail
- [Bug]: Download PDF example not working HOT 2
- [Bug]: Not able to download pdf in the live/dev environment, works in local HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppeteer.