-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify creating/opening a browsing context #116
Comments
When the browser gets started there is always a default tab open, which implies that also a top-level browsing context (navigable) exists. When the last tab gets closed, the session automatically ends and the browser quits. So under which condition do we have to block the navigation? Isn't it just that we have to retrieve the current or a list of known to be open browsing contexts? |
I think the concern is that if one doesn't specify how to create a browsing context, one can't be sure it already exists. Nothing really requires browsers to open a context at startup. In practice a) browsers always do create a context at startup, so it's hard to get into a situation where there isn't one and b) we do need this feature for the same reasons we needed it in WebDriver classic. So I don't think we need to block on it but I also don't think we want to delay it too mcuh given it's not complex. |
Sure but there is browsingContext.getTree() to get the list of open browsing contexts. Maybe we also just need a command to return the currently active navigable / browsing context. |
My concern stems from the fact that most Puppeteer examples one can find all open a new page and navigate it, rather than finding the already open page and using that. It's true that this doesn't block #43, but it seems like something we want sooner rather than later. Even with such a command, it would still be good to specify that there should be exactly one browsing context for a new session, if we want clients to be able to depend on that and not waste that browsing context. |
We could speccify that there must be at least one browsing context at session creation, but we can't specify that there must be exactly one (consider connecting to an already running browser, or a tool that does passive monitoring of network traffic and rendering timing for performance analysis. rather than driving tests itself). |
At least one would do then :) |
Fixes #116. Co-authored-by: Henrik Skupin <mail@hskupin.info>
Before one can navigate a browsing context, one has to be able to open one.
The text was updated successfully, but these errors were encountered: