autokap 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +6 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -185,6 +185,12 @@ async function executeBrowserCommand(browser, method, params) {
|
|
|
185
185
|
case 'addCookies':
|
|
186
186
|
await browser.addCookies(params.cookies);
|
|
187
187
|
return null;
|
|
188
|
+
// Page info (used by RemoteBrowser.currentPage proxy)
|
|
189
|
+
case 'getPageInfo': return {
|
|
190
|
+
url: browser.currentPage.url(),
|
|
191
|
+
viewport: browser.currentPage.viewportSize(),
|
|
192
|
+
};
|
|
193
|
+
case 'getPageTitle': return await browser.currentPage.title();
|
|
188
194
|
// Screenshots — serialize buffers to base64
|
|
189
195
|
case 'takeScreenshot': {
|
|
190
196
|
const buf = await browser.takeScreenshot();
|