Lets say I managed to get (and store) the console output, network traffic, cookies and the HTML of site A (by using an extension or/plus a script).
Now I have all these logs and want to show them on site B as if they were the actual logs of site B, meaning that if I Ctrl+Shift+I it I'd see site's A HTML, console output, etc.
One approach could be having new dev tools extensions similar to the existing ones playing my data, but having all these tabs essentially duplicated seems wrong (and like a lot of work).
Is there a simple way of doing this without creating new dev tools tabs?, like sending these logs to the existing dev tools tabs? (Elements, Network, Console, etc.).
Did some research but couldn't find and API exposing methods to feed the existing tabs.
Related
This situation cannot be easily reproduced because the website requires login through Steam.
The webpage shows a list of items that can be purchased. Whenever a new item is listed, it will appear at the top of the list of items. However, when checking Chrome DevTools and Fiddler, I cannot find the Request that is made that contains the data of the newly listed items. In fact, there are no requests made at all.
I am not using any filters in Chrome DevTools.
How is this webpage retrieving data from the server, and why are Chrome and Fiddler not picking up on it?
This question contains the answer: POST request not showing up in Chrome DevTools
jvda:
This is a common source of conufsion when debugging networking requests done from the web. Normally, developers look at these network requests from top down and assume that the lowest one is the most recent request made - therefore assuming that the request must be at the bottom. For 'plain' HTTP this is correct. However, many apps that want to show data in real-time, use WebSockets to communicate with an API.
The same thing happens in the Web-version of Whatsapp. Only assets like the actual JavaScript-app, icons etc are loaded using plain HTTP. Then, a WebSocket is opened through which messages are exchanged for example.
I thought this question was irrelevant but I guess it was not. The data is exchanged through WebSockets
Currently the Oculus Quest headset's browser seems pretty basic, and doesn't have features such as copy/paste, etc. It also doesn't seem like it can't handle launching other apps via 'deep links'. I don't personally have an Oculus Go, but I assume it would be a pretty similar experience?
Is there any way we can access the URL's/history/etc in the headset's browser from a computer (eg. programatically)? At least that way we could copy the relevant parts, and maybe programatically 'type' them back into the headset in the area we need them.
It seems this is possible using Chrome DevTools Remote Debugging if you have developer mode enabled on your headset.
You can find the official documentation on the Oculus developer website.
Once developer mode is enabled, plug your headset into your computer with the USB-C cable.
While the headset is connected to your computer:
Open Google Chrome on the computer
Access the special chrome://inspect/#devices URL
Locate the headset under the 'Remote Target' heading
Click 'inspect' on the page you want to interact with
There seems to be an 'inspect' option for each 'tab' open within the headset web browser:
From there, you have access to the browser window like you normally would with DevTools, so can access things from the JavaScript console like the URL, or to manipulate fields:
As far as doing this programatically, the DevTools protocol is documented, and there are many SDK's for it in various languages.
The DevTools protocol docs talk about the DOM Domain (among other things), which seems to give similar features as the above 'inspect' functionality. By using DOM.getDocument you can get the equivalent of accessing document from the Chrome DevTools console. This returns a Node object which contains values such as documentURL.
I am facing a Chrome popup while trying to run Robot Frame work script:
Microsoft Security Essentials wants to restore your Chrome settings to their
original defaults.
This will reset your homepage, new tab page and
search engine, disable your extensions, and unpin all tabs. It will
also clear other temporary and cached data, such as cookies, content
and site data.
In chrome extension, my developer mode is unchecked, whereas it should be checked.
The Robot Framework automation script is just to open the google Chrome browser and load google search page.
I am using Win 7 Home Basic OS.
I have attached screenshots.
It appears that most Chrome support specialists will ask you to run an anti-malware tool to verify that your system is running normally. These can be found by searching on the popup message.
One Reddit user commented that in his case the problem was resolved by altering the Windows registry:
I finally found a fix for this. There is a setting in the registry
that's causing it.
In the registry it's under
HKEY_CKU\CURRENT_USER\Software\Google\Chrome\TriggeredReset
Delete the TriggeredReset key and then close regedit. Fixed.
This is an API for 3rd party programmers who want to create cleaning
tools. But if the tool isn't written properly, the triggered reset
never gets deleted and we have it always asking.
In Chrome Dev Tools, when viewing the Network tab, is it possible to select a script and open it in the Sources tab? Double-clicking the script opens it raw in a new browser tab.
Because the Sources tab organizes all assets by their source domains (along with folder paths), it can be time consuming to locate a particular script, if you don't know immediately where it came from. You have to switch back and forth between Network and Sources, taking note of the domain and folder path in the script's header and then trying to dig through all the source domain's and subfolders until you locate the script.
It seems like there should be some obvious way of opening a script in the Sources tab from the Network tab, but I don't see how. You appear to have to manually dig to find it.
EDIT
This feature is now available in Chrome Canary, and should be available in stable Chrome in a few weeks.
As far as I know this is not possible right now. I think it's a good idea though, so I reported it for you.
The quickest way, I can think of, to open a script from the network tab in the sources tab is to:
copy/memorize name of the script from network tab,
go to the sources tab,
open file search (cmd+p / ctrl+p),
enter name of the file you are looking for.
Basically what I need is a way to automatize the result of the following operations:
open a new tab;
open the Network tab in the developer tools;
load an URL;
select "Save All as HAR".
Often, proposed solutions involves the use of PhantomJS, browsermob-proxy, or pcap2har; those won't fit my case since I need to work with SPDY traffic.
I tried to dive into the Google Chrome Extensions API and indeed I managed to automatize some tasks, but still no luck for what concerns the HAR files generation. Now this method is particularly promising but I still can't figure out how would I use it.
In other words, I need something like this experiment from the Google guys. Note the following:
We used Chrome's remote debugging interface with a custom client that starts up the browser on the phone, clears its cache and other state, initiates a web page load, and receives the Chrome developer tools messages to determine the page load times and other performance metrics.
Any ideas?
Solution
For the curious, I ended up with a Node.js module that automates such kind of tests: chrome-har-capturer. This also gave me the opportunity to dig deeper into the Remote Debugging Protocol and to write a lower-level Node.js interface for general-purpose Chrome automation: chrome-remote-interface.
The short answer is, there is no way to get at the data you are after directly. The getHAR method is only applicable to extensions meant to extend DevTools itself. The good news is, you can construct the HAR file yourself without too much trouble - this is exactly what phantom.js does.
Start Chrome with remote debugging
Connect to Chrome on the debugging port with a websocket connection
Enable "Network" debugging, you can also clear cache, etc - see Network API.
Tell the browser to navigate to the page you want to capture, and Chrome will stream all the request meta-data back to you.
Massage the network data into HAR format, ala phantom.js
...
Profit.
For a head start, I have a post that with sample Ruby code that should you get started with steps 1-4: http://www.igvita.com/2012/04/09/driving-google-chrome-via-websocket-api/
By now there's a browser plugin to do that: https://github.com/devtools-html/har-export-trigger
It uses the WebExtensions DevTools API and I got it to work with both Firefox and Chrome.
See my code for Chrome here: https://github.com/theri/web-measurement-tools/blob/master/load/load_url_using_chrome.py#L175
Automatically installing the plugin in Chrome is a bit more complicated than in Firefox, but feasible - I extracted the plugin archive locally and then link to it in chrome_prefs.json (see same repository).
Not sure if it helps, HAR Recorder uses chrome debug protocol to record HAR and generate a har file (without opening devtools). If you want a variation, you can fork and make changes on it.