Comments (9)
The port decides the Chrome instance while you can attach to a specific tab/window using the chooseTab
option.
Now, in parallel means that you will have several instances of the client:
Chrome(options1, function (chrome) { /*...*/ });
Chrome(options2, function (chrome) { /*...*/ });
// ...
from chrome-remote-interface.
Exactly, but how would you differentiate between windows? Can you specify to which window can Chrome connect to, and can multiple Chrome be connected to the same chromium browser?
from chrome-remote-interface.
There's no such thing as windows for what concerns the remote debugging protocols, only tabs, be them part of the same window or not. You can obtain the list of the currently opened tabs for a given browser instance identified by a port with Chrome.List
, after that you can select one tab object from the returned array and feed it to the chooseTab
option.
from chrome-remote-interface.
Ok thank you, will try. It is a bit of an issue, because as I understand, nw.js is build on chromium but it does not support tabs.
from chrome-remote-interface.
Different windows of the same Chrome instance are considered tabs. Try this:
- start your nw.js application like
nw --remote-debugging-port=9222 /the/app
; - manage to open multiple windows;
- visit
http://localhost:9222/json
and see if there is an entry for each open window.
If that's the case you can use the method I described above.
from chrome-remote-interface.
Thx again.
from chrome-remote-interface.
I am having a little bit of trouble with never versions of nw.js - chromium and how to open my app inside of it.
Works with version 0.12.3:
Chrome.New({
port: that.options.port,
url: 'file:///' + config.launcher.def_officer_nwjs.appDir + '/index.html'
}, function (err, tab) {
});
But with never versions ( > 0.12.3), url that is used for oppening app does not use file. First window that is successfully opened:
{
description: "",
devtoolsFrontendUrl: "/devtools/inspector.html?ws=localhost:12406/devtools/page/8573B029-FCF9-4EB2-B8BA-A5D2FFCD5EE4",
faviconUrl: "chrome://extension-icon/laeohklakmaeckjcebinbjcagklmbcnm/24/1",
id: "8573B029-FCF9-4EB2-B8BA-A5D2FFCD5EE4",
title: "nw-guardian-app",
type: "app",
url: "chrome-extension://laeohklakmaeckjcebinbjcagklmbcnm/index.html",
webSocketDebuggerUrl: "ws://localhost:12406/devtools/page/8573B029-FCF9-4EB2-B8BA-A5D2FFCD5EE4"
}
Version 0.12.3
url: 'file:///......'
Any suggestions on how to successfully open my app in new window?
from chrome-remote-interface.
I don't know, I've never used NW.js but I think you can always start a new application with nw
using a child process (if you really need to do that from Node.js).
You should post a message on the NW.js mailing list, this doesn't seem to concern chrome-remote-interface.
from chrome-remote-interface.
Well I dont want to do that through nw, but with this library, because Chrome.New opens a new window. When ran with nw, it will open up a new browser.
Ok thank's for your help.
from chrome-remote-interface.
Related Issues (20)
- TS typings do not support the `sessionId` parameter. HOT 4
- Property 'redirectHasExtraInfo' is missing in type HOT 3
- How can I listen all the client side event? HOT 2
- Node exited with WebSocket is not open: readyState 2 (CLOSING) HOT 3
- How to copy string to clipboard with Runtime.evaluate? HOT 1
- Debugger for nested iframes from another origin HOT 2
- failed to load response, no resource with given identifier found HOT 3
- Unable to Run SystemInfo.getProcessInfo; Browser Target not listed in Target.getTargets HOT 1
- chrome-remote-interface activate returns not found for Firefox HOT 3
- Page.navigate loads in an inactive tab
- Error: Can only get response body on requests captured after headers received. HOT 2
- Sending Fetch.failRequest to new tab before initial request
- The current page is embedded with an iframe, which has an upload button with<input type="file"/>. How can I enter the iframe, access this button, and insert the file path into it? HOT 3
- cannot close browser with out HOT 2
- How to evaluate javascript inside an iframe? HOT 11
- Clicking inside an iframe? HOT 1
- Does this work in Bun? HOT 2
- Removing event subscriptions on Domain HOT 1
- How to properly handle iframe "swaps" (FrameDetached, Reason "swap")? HOT 3
- (0 , chrome_remote_interface_1.default) is not a function error when running CDP() through Cypress HOT 1
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 chrome-remote-interface.