
- Command line equivalent to chrome network inspector for mac#
- Command line equivalent to chrome network inspector windows#
For example, use the Network Console tool when youre developing and testing web APIs. $$("header") Synta圎rror: Failed to execute 'querySelectorAll' on 'Document': 'header' is not a valid selector.Īdvantages of one approach are pretty much considered as the cons of another method, and vice versa. Use the Network Console tool to send web API requests. $x(".//header/") Synta圎rror: Failed to execute 'evaluate' on 'Document': The string './/header/' is not a valid XPath expression. In DevTools, on the main toolbar, select the Network tab. Or, press Ctrl+Shift+J (Windows, Linux) or Command+Option+J (macOS). If the XPath or CSS selector is invalid, an exception will be shown in red text. Open the Inspect Network Activity Demo in a new tab or window: To open DevTools, right-click the webpage, and then select Inspect.

If elements are matched, they will be returned in a list.Check results returned from console execution.Type in CSS selectors like $$("header") to evaluate and validate.Type in XPath like $x(".//header") to evaluate and validate.For example, CSS selector header should match everything (inline CSS, scripts etc.) that contains the word header, instead of match only elements. However, if there are matching strings inside DOM, they will be considered as valid results as well. If there are matched elements, they will be highlighted in DOM.Type in XPath or CSS selectors to evaluate.Press Ctrl + F to enable DOM searching in the panel.Elements panel should be opened by default.The Command Menu opens, displaying the Open File list: If there's a greater-than (>) prompt, press Backspace to get to the Open. Or, you can click the menu button in DevTools and then select Open file. When DevTools has focus, press Ctrl+P (Windows, Linux) or Command+P (macOS). Execute tokens $x("some_xpath") or $$("css-selectors") in Console panel, which will both evaluate and validate. Or press Ctrl+Shift+I (Windows, Linux) or Command+Option+I (macOS).Use the search function inside Elements panel to evaluate XPath/CSS selectors and highlight matching nodes in the DOM.On the right you see it lit up with the tooltip just as if we were debugging a web page.Google Chrome provides a built-in debugging tool called " Chrome DevTools" out of the box, which includes a handy feature that can evaluate or validate XPath/CSS selectors without any third party extensions.

Its hard to see in the image below, but on the left I have my chrome window pointing at the remote debugger, highlighting one of the toolbar labels. Select the window that starts with "Developer Tools" and you'll be able to inspect the css for the inspector.
Command line equivalent to chrome network inspector windows#
Now, go ahead and navigate to It will present you with a list of windows to display in the debugger.
Command line equivalent to chrome network inspector for mac#
Since we want to inspect the inspector, we need to start an inspector window first (As above Use the shortcut keys for Mac it's Command+option+i.)


If you access that web service, it will give you the ability to use the inspector to inspect any chrome window that is running. This will start up an instance of chrome, that will send debugging messages to a local webserver on port 9222. (better windows instructions can be found here: ) On windows, Its chrome.exe -remote-debugging-port=9222 On OSX, open an terminal window and execute the following: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome -remote-debugging-port=9222 The key is that you have to start up chrome in 'Remote Debugging' mode.
