const chaldeas = require('./../src');

const Chaldeas = chaldeas.default;

const c = Chaldeas.new();
c.fetchProtocol().then((r) => {
  Promise.all([
    r.Network.enable(),
    r.DOM.enable(),
  ]).then(() => {
    const a = r.DOM.getDocument();
    a.then((b) => {
      console.log(b);
    });
  }).then(() => {
    c.terminate();
  });
});

@@ -1,12 +1,155 @@
+// captureScreenshot%0A// from : https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot%0Aconst fs = require('fs');%0A
 const chalde
@@ -315,19 +315,20 @@
 ,%0A    r.
-DOM
+Page
 .enable(
@@ -356,52 +356,201 @@
     
-const a = r.DOM.getDocument();%0A    a.then((b
+r.Page.navigate(%7B url: 'https://github.com/teitei-tk' %7D);%0A    r.Page.captureScreenshot().then((cap) =%3E %7B%0A      const fr = Buffer.from(cap.data, 'base64');%0A      fs.writeFile('foo.png', fr, (err
 ) =%3E
@@ -554,24 +554,26 @@
  =%3E %7B%0A      
+ 
+ 
 console.log(
@@ -576,20 +576,26 @@
 log(
-b
+err
 );%0A    
+ 
+ 
 %7D);%0A
+  
   %7D)
@@ -612,16 +612,18 @@
 %3E %7B%0A    
+ 
+ 
 c.termin
@@ -629,16 +629,24 @@
 nate();%0A
+    %7D);%0A
   %7D);%0A%7D)

update example