How to export .graphml file for a web page to generate page-graph

Hello brave team,
I am trying to generate page-graph. I am following this below link:

I have followed all the instructions and successfully built Brave browser in my local pc. But when I run this browser (npm start Static) I could not find where I could export a webpage to .graphml format.

I have also found a community link where a person mentioned that he exported .graphhml file following the below procedure.
Right-click on the webpage => Inspect => Developer console window => Under element menu there is a sub-menu page graph => In page Graph sub menu there is button “Save full page graph” which exports a .graphml file.

But unfortunately, I don’t see any sub-menu named page-graph under the element menu. Is there some settings which needs to set to show the page-graph option? or the option is moved to another segment?

More info:
I did the below things to build:
git clone -b page-graph https://github.com/brave/brave-browser
cd brave-browser
npm install
npm run init
npm run build – Static

I have attached an image what is shown under element option.

Brave version is: [Version 1.12.48 Chromium: 83.0.4103.116 (Developer Build) (64-bit)]


My current branch is “page-graph”
Last commit of page-graph branch is:
9b948cad7ba1ee224c4e8843ab7c72d68891a14b --> Set brave-core to track page-graph branch
Last commit of chromium src:
faf34a95a93ff46eb36000dab45cf66e58048b0f --> Publish DEPS for 83.0.4103.116

Can you help me where I can find the page-graph option and then export a webpage as .graphml file?

1 Like

(I know we followed up over email but just replying here too incase others have the same questions)

Howdy Arup!

Thank you for the message! You can fetch the graphs by using the devtools protocol. You might find the below code useful, which handles a bunch of the pain-in-the-butt parts of dealing with child frames, devtools, and all that.

I’ve updated the wiki to point to these tools. Please give that a look and let me know if that works for you.

Thanks!

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.