Reputation: 29
I am loading new web page in new tab from my javascript by writing below code. window.open('www.gmail.com','_blank')
While the new tab is loading I would like to read all redirected url's in the network tab(chrome devtools). I tried to reload all url's using performance.getEntriesByType("resource");
but here the issue is my existing application is refreshing.
To make this question more clear.
1) I have my existing application lets a gmail only.
2) When I click on one button(lets say compose in gmail ), it has to open new web page in different tab.
3) When the new page gets loaded completely I would like to read all loaded urls' in the network tab in chrome dev tools.
4) While reading those url's from chrome network tab my existing page should not refresh.
Upvotes: 1
Views: 5403
Reputation:
I don't think that what you want is possible. See Can I programmatically open the devtools from a Google Chrome extension?
You could manually export the network data as JSON (saves as .har). Then JSON.parse()
using the console or external script. See Export data from Chrome developer tool.
Edit:
Maybe you can modify the XMLHttpRequest object to add an onOpen onSend listener. See How can I modify the XMLHttpRequest responsetext received by another function?
Upvotes: 1