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]: Unable to bundle puppeteer script with wepack HOT 2
- [Feature]: Inserting a Audio and video Stream HOT 2
- PDF export error for chart and HTM amchart5 HOT 1
- [Bug]: Stuck at puppeteer.connect() HOT 2
- [Bug]: Even your example code is not working - SyntaxError: Cannot use import statement outside a module HOT 1
- [Feature]: Inserting a Audio and video Stream
- "[network.spec] network Page.authenticate should work" test is flaky HOT 1
- [Bug]: Browser gets disconnected in Docker without any errors HOT 28
- [Bug]: Failed to launch the browser process!\nchrome_crashpad_handler: --database is required HOT 2
- Docs: the index page for docs should not be a readme.md
- [Feature]: Accessing WebRTC peerConnection in puppeteer
- Force pushing to default branch HOT 1
- [Bug]: ERROR in DIGITALOCEAN APPLICATION PLATFORM HOT 2
- [Bug]: when accessing browser.targets() I don't get info about _targetInfo which have property like _targetInfo.title , _targetInfo.type... HOT 2
- [Bug]: Opening the extension popup.html using will return new empty popup without any data how to get popup.html within the context of a specific tab/website HOT 4
- [Bug]: Background is pink when using background: repeating-linear-gradient HOT 10
- [Bug]: Could not able to get the selectors when headless: true, but it is working with headless:false HOT 1
- [Bug]: Freezing when querying frames on certain websites HOT 11
- [Feature]: `Mouse.dragAndDrop` API not supported for WebDriver BiDi HOT 7
- Error: Attempted to use detached Frame HOT 15
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.