profile
viewpoint

puppeteer/puppeteer 66155

Headless Chrome Node.js API

sadym-chromium/puppeteer 0

Headless Chrome Node.js API

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 1396c9d4cd3efbe2c7674c4ab4b720965e48adee

chore: bump version to v5.3.1-post (#6440)

view details

push time in a month

PR merged puppeteer/puppeteer

chore: bump version to v5.3.1-post cla: yes
+2 -2

0 comment

2 changed files

sadym-chromium

pr closed time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 11ab402846e7d9d41d3ce361a0979c7fcd61a1bb

fix: add mime dependency back to fix build (#6441) * Added back dependency `"mime": "^2.0.3",` to fix build; * Previous builds passed because of the node package caching.

view details

push time in a month

PR merged puppeteer/puppeteer

fix: add mime dependency back to fix build cla: yes
  • Added back dependency "mime": "^2.0.3", to fix build;
  • Previous builds passed because of the node package caching.
+1 -0

0 comment

1 changed file

sadym-chromium

pr closed time in a month

PR opened puppeteer/puppeteer

fix: add mime dependency back to fix build
  • Added back dependency "mime": "^2.0.3", to fix build;
  • Previous builds passed because of the node package caching.
+1 -0

0 comment

1 changed file

pr created time in a month

create barnchpuppeteer/puppeteer

branch : mime

created branch time in a month

PR opened puppeteer/puppeteer

Reviewers
chore: bump version to v5.3.1-post
+2 -2

0 comment

2 changed files

pr created time in a month

create barnchpuppeteer/puppeteer

branch : 5.3.1-post

created branch time in a month

created tagpuppeteer/puppeteer

tagv5.3.1

Headless Chrome Node.js API

created time in a month

release puppeteer/puppeteer

v5.3.1

released time in a month

delete branch puppeteer/puppeteer

delete branch : 5.3.1

delete time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha c7d32cb92f7e3556a3dba51832ab9d6a07ddbf35

chore: mark version v5.3.1 (#6439)

view details

push time in a month

PR merged puppeteer/puppeteer

Reviewers
chore: mark version v5.3.1 cla: yes
+13 -13

0 comment

3 changed files

sadym-chromium

pr closed time in a month

PR opened puppeteer/puppeteer

Reviewers
chore: mark version v5.3.1
+13 -13

0 comment

3 changed files

pr created time in a month

create barnchpuppeteer/puppeteer

branch : 5.3.1

created branch time in a month

delete branch puppeteer/puppeteer

delete branch : idle-detection

delete time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 8f3171a33c79e6795027fc4b6e6f97b90b3c4005

feat(permissions): Add idle-detection permission (#6438) Added `idle-detection` permission needed to test IdleDetector: * [CL 2417779 idle-detection: Implement requestPermission() method](https://chromium-review.googlesource.com/c/chromium/src/+/2417779)

view details

push time in a month

PR merged puppeteer/puppeteer

feat(permissions): Add idle-detection permission cla: yes

Added idle-detection permission needed to test IdleDetector:

+1 -0

0 comment

1 changed file

sadym-chromium

pr closed time in a month

PR opened puppeteer/puppeteer

feat(permissions): Add idle-detection permission

Added idle-detection permission needed to test IdleDetector:

+1 -0

0 comment

1 changed file

pr created time in a month

create barnchpuppeteer/puppeteer

branch : idle-detection

created branch time in a month

push eventmathiasbynens/css-dbg-stories

Maksim Sadym

commit sha 9a99c73ca3c78ff07ce433204600f32337ce88d4

Update idle-detector.html

view details

push time in a month

push eventmathiasbynens/css-dbg-stories

Maksim Sadym

commit sha e33a289558a394366a30dfb4fe313a6a605ab25f

Update idle-detector.html

view details

push time in a month

PR opened mathiasbynens/css-dbg-stories

Switch to proper permission `idle-detection`

Permission for IdleDetector changed from notifications to idle-detection in the CL idle-detection: Implement permissions prompt and settings UI

+1 -1

0 comment

1 changed file

pr created time in a month

push eventsadym-chromium/css-dbg-stories

Maksim Sadym

commit sha 19ea46adf7337c1eb08e74c4e65c74ec51157e63

Update idle-detector.html Permission for `IdleDetector` changed from `notifications` to `idle-detection` in the CL [idle-detection: Implement permissions prompt and settings UI](https://chromium-review.googlesource.com/c/chromium/src/+/2360485)

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 6f336eb9784d1a480cdeafb83b7e5f5fb8c17278

feat(OOPIF): debug message in case of iFrame moved to another process (#6432) Debug message clarifying the problem like `Issue 1060080: Event Network.loadingFinished is not sent when a frame is loaded from another domain`: https://bugs.chromium.org/p/chromium/issues/detail?id=1060080). It can help users to identify problem with OOPIF easier without digging into the CDP protocol implementation like in the bug `1060080` mentioned above. To reproduce: 1. Run `DEBUG="puppeteer:frame" NODE_PATH=../ node examples/oopif.js`. 2. Verify the output contains the debug message: ` puppeteer:frame The frame '...' moved to another session. Out-of-proccess iframes (OOPIF) are not supported by Puppeteer yet. https://github.com/puppeteer/puppeteer/issues/2548 `

view details

push time in a month

delete branch puppeteer/puppeteer

delete branch : 1060080_cross_origin_iframe

delete time in a month

PR merged puppeteer/puppeteer

Reviewers
feat(OOPIF): debug message in case of iFrame moved to another process cla: yes

Debug message clarifying the problem like this: Issue 1060080: Event Network.loadingFinished is not sent when a frame is loaded from another domain. It can help users to identify problem with OOPIF easier without digging into the CDP protocol implementation like in the bug 1060080 mentioned above.

To reproduce:

  1. Run DEBUG="puppeteer:frame" NODE_PATH=../ node examples/oopif.js.
  2. Verify the output contains the debug message:
puppeteer:frame The frame '...' moved to another session. Out-of-proccess
iframes (OOPIF) are not supported by Puppeteer yet.
https://github.com/puppeteer/puppeteer/issues/2548
+66 -0

0 comment

2 changed files

sadym-chromium

pr closed time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha d47ce312ce06f6d5c72cded36afa5519d6b76914

example oopif.js

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 19ea80509f89d2f5de3eb8e463366db29deeb834

cross-origin frame tests

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 99c5f8b425f0d6fe8a5cf3fe0470b705e3194268

Update src/common/FrameManager.ts Co-authored-by: Mathias Bynens <mathias@qiwi.be>

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 5521d6255b3ef3d9ad7faa6a76b2c92718c9b2f2

Update FrameManager.ts

view details

push time in a month

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:

done

sadym-chromium

comment created time in a month

PullRequestReviewEvent

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 0fb1771e0fc15311f5d75c4cf643705a85a6784b

Update src/common/FrameManager.ts Co-authored-by: Mathias Bynens <mathias@qiwi.be>

view details

push time in a month

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:+    // https://github.com/puppeteer/puppeteer/issues/2548+    debugFrames(+      `The frame '${event.targetInfo.targetId}' moved to another session. ` ++        `Out of proccess iFrames (OOPIF) are not supported by Puppeteer yet. ` +

done

sadym-chromium

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:+    // https://github.com/puppeteer/puppeteer/issues/2548+    debugFrames(

done

sadym-chromium

comment created time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 27521747ad038a841aaf33fe48d8be64617b3995

comment misspelling

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha d2beec78e2e9750750e76ff4c91ad123ea0b3d5a

text update

view details

push time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha ad8bf62fef6a8c2b54b5e15275082885af689441

lint fix

view details

push time in a month

PR opened puppeteer/puppeteer

Reviewers
feat(OOPIF): debug message in case of iFrame moved to another process

Debug message clarifying the problem like this: Issue 1060080: Event Network.loadingFinished is not sent when a frame is loaded from another domain. It can help users to identify problem with OOPIF easier without digging into the CDP protocol implementation like in the bug 1060080 mentioned above.

+20 -0

0 comment

1 changed file

pr created time in a month

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 229fd3f082fd19e0e1f217c519f1a92478e3a9d5

Add todo

view details

push time in a month

create barnchpuppeteer/puppeteer

branch : 1060080_cross_origin_iframe

created branch time in a month

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 17960e5d8d6b019504ef8108316b4d641db41249

feat(page): emulate idle state (#6410) * https://bugs.chromium.org/p/chromium/issues/detail?id=1090802 * added `page.emulateIdleState(...)` allowing emulate or remove emulation of the idle state; * added test `emulate idle` -> `remove emulation` -> `emulate idle` -> `remove emulation`; * added launch argument `--enable-blink-features=IdleDetection` to turn IdleDetection on.

view details

push time in 2 months

delete branch sadym-chromium/puppeteer

delete branch : idle_overrides

delete time in 2 months

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 17960e5d8d6b019504ef8108316b4d641db41249

feat(page): emulate idle state (#6410) * https://bugs.chromium.org/p/chromium/issues/detail?id=1090802 * added `page.emulateIdleState(...)` allowing emulate or remove emulation of the idle state; * added test `emulate idle` -> `remove emulation` -> `emulate idle` -> `remove emulation`; * added launch argument `--enable-blink-features=IdleDetection` to turn IdleDetection on.

view details

push time in 2 months

PR merged puppeteer/puppeteer

Reviewers
feat(page): emulate idle state cla: yes
  • https://bugs.chromium.org/p/chromium/issues/detail?id=1090802
  • added page.emulateIdleState(...) allowing emulate or remove emulation of the idle state;
  • added test emulate idle -> remove emulation -> emulate idle -> remove emulation;
  • added launch argument --enable-blink-features=IdleDetection to turn IdleDetection on.
+204 -0

0 comment

7 changed files

sadym-chromium

pr closed time in 2 months

Pull request review commentpuppeteer/puppeteer

feat(page): emulate idle state

+/**+ * Copyright 2020 Google Inc. All rights reserved.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *     http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import expect from 'expect';+import {+  getTestState,+  setupTestBrowserHooks,+  setupTestPageAndContextHooks,+  describeFailsFirefox,+} from './mocha-utils'; // eslint-disable-line import/extensions++describeFailsFirefox('Emulate idle state', () => {+  setupTestBrowserHooks();+  setupTestPageAndContextHooks();++  async function getIdleState() {+    const { page } = getTestState();++    const stateElement = await page.$('#state');+    return await page.evaluate((element: HTMLElement) => {+      return element.innerText;+    }, stateElement);+  }++  async function verifyState(expectedState: string) {+    const actualState = await getIdleState();+    expect(actualState).toEqual(expectedState);+  }++  it('changing idle state emulation causes change of the IdleDetector state', async () => {+    const { page, server, context } = getTestState();+    await context.overridePermissions(server.PREFIX + '/idle-detector.html', [+      'notifications',+    ]);++    await page.goto(server.PREFIX + '/idle-detector.html');++    // // InitialState can be idle as well.+    const initialState = await getIdleState();++    // Emulate Idle states and verify IdleDetector updates state accordingly.+    await page.emulateIdleState({+      isUserActive: false,+      isScreenUnlocked: false,+    });+    await verifyState('Idle state: idle, locked.');++    await page.emulateIdleState({+      isUserActive: true,+      isScreenUnlocked: false,+    });+    await verifyState('Idle state: active, locked.');++    await page.emulateIdleState({+      isUserActive: true,+      isScreenUnlocked: true,+    });+    await verifyState('Idle state: active, unlocked.');++    await page.emulateIdleState({+      isUserActive: false,+      isScreenUnlocked: true,+    });+    await verifyState('Idle state: idle, unlocked.');++    await page.emulateIdleState();+    // Remove Idle emulation and verify IdleDetector is in initial state.+    await verifyState(initialState);

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent
PullRequestReviewEvent

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 9d799d3787420de933a17b1184ff04aea196ec49

Update idle_override.spec.ts

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 8115bb7d8ed7b1d67da5f8586f6b7fbaec98d3e2

comment style fix

view details

Maksim Sadym

commit sha 4c81f02a985a666422334b23ff2356d6ed4caa78

comments

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha c13f945d8b9b53706fb28ce34681e855ba4aa039

Update src/node/Launcher.ts Co-authored-by: Mathias Bynens <mathias@qiwi.be>

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha e36113a9b74f19d08a5a33dc5a44e104e8ea1254

todo + test update

view details

push time in 2 months

delete branch sadym-chromium/puppeteer

delete branch : 5.3.0-post

delete time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 03e41da465f6043ae9c687382f7f7d24b997b9d8

chore: bump version to v5.3.0-post (#6413)

view details

push time in 2 months

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 03e41da465f6043ae9c687382f7f7d24b997b9d8

chore: bump version to v5.3.0-post (#6413)

view details

push time in 2 months

PR merged puppeteer/puppeteer

Reviewers
chore: bump version to v5.3.0-post cla: yes
+2 -2

0 comment

2 changed files

sadym-chromium

pr closed time in 2 months

PR opened puppeteer/puppeteer

chore: bump version to v5.3.0-post
+2 -2

0 comment

2 changed files

pr created time in 2 months

create barnchsadym-chromium/puppeteer

branch : 5.3.0-post

created branch time in 2 months

created tagpuppeteer/puppeteer

tagv5.3.0

Headless Chrome Node.js API

created time in 2 months

release puppeteer/puppeteer

v5.3.0

released time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 030fcaa0756cfe1762ce08f51815c3237b324e8f

chore: mark version v5.3.0 (#6412)

view details

push time in 2 months

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 030fcaa0756cfe1762ce08f51815c3237b324e8f

chore: mark version v5.3.0 (#6412)

view details

push time in 2 months

delete branch sadym-chromium/puppeteer

delete branch : version_5.2.2

delete time in 2 months

PR merged puppeteer/puppeteer

Reviewers
chore: mark version v5.3.0 cla: yes
+16 -14

3 comments

4 changed files

sadym-chromium

pr closed time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 4ce600a6f45b4f11b6bc9ccaad48c5416b604ec1

chore: Remove target debug-unit and add unit-debug (#6411) * debug-unit is confusing * unit-debug runs all tests in debug mode

view details

push time in 2 months

delete branch sadym-chromium/puppeteer

delete branch : unit-debug

delete time in 2 months

push eventpuppeteer/puppeteer

Maksim Sadym

commit sha 4ce600a6f45b4f11b6bc9ccaad48c5416b604ec1

chore: Remove target debug-unit and add unit-debug (#6411) * debug-unit is confusing * unit-debug runs all tests in debug mode

view details

push time in 2 months

PR merged puppeteer/puppeteer

Reviewers
chore: Remove target debug-unit and add unit-debug cla: yes
  • debug-unit is confusing
  • unit-debug runs all tests in debug mode
+1 -1

0 comment

1 changed file

sadym-chromium

pr closed time in 2 months

pull request commentpuppeteer/puppeteer

chore: mark version v5.3.0

Mark version v5.2.2 perhaps? were there breaking changes in this version?

done

If it only includes chromium roll, we should probably bump the minor version (e.g. #5883 (comment))

done

sadym-chromium

comment created time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 0c6da96b0e680c02ecbba083c04ff2b993b4b685

chore: mark version v5.3.0

view details

push time in 2 months

PR opened puppeteer/puppeteer

chore: mark version v86.0.4240.0
+14 -13

0 comment

3 changed files

pr created time in 2 months

create barnchsadym-chromium/puppeteer

branch : version_5.2.2

created branch time in 2 months

PR opened puppeteer/puppeteer

Reviewers
chore: Remove target debug-unit and add unit-debug
  • debug-unit is confusing
  • unit-debug runs all tests in debug mode
+1 -1

0 comment

1 changed file

pr created time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 759c0664efb0ab2e594d8162d3def80fc0fcdd42

chore: Remove target debug-unit and add unit-debug * debug-unit is confusing * unit-debug runs all tests in debug mode

view details

push time in 2 months

create barnchsadym-chromium/puppeteer

branch : unit-debug

created branch time in 2 months

push eventsadym-chromium/puppeteer

push time in 2 months

delete branch sadym-chromium/puppeteer

delete branch : roll_chromium_86

delete time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 62ac16733913b388e2a4904ff6ef21aa431475e9

feat(chromium): roll Chromium to r800071 (#6407) * roll Chromium to version 86, r800071 * roll Chrome DevTools protocol version to 0.0.799653 * fix HTTPRequest.continue after * CDP: accept post data in the binary form in Fetch.continueRequest. https://chromium-review.googlesource.com/c/chromium/src/+/2315239 * update new-docs

view details

Maksim Sadym

commit sha d17f99271ec7751dcdaf63e68451beaf99363b3f

feat(chromium): support IdleOverrides * https://bugs.chromium.org/p/chromium/issues/detail?id=1090802 * added `page.setIdleOverride(...)`; * added `page.clearIdleOverride()`; * added tests; * added launch argument `--enable-blink-features=IdleDetection` to turn IdleDetection on.

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 2fc5f2ee57ba3df92aedb63e3a8574a44a636fbc

old docs + exclude firefox

view details

Maksim Sadym

commit sha cc17e76de9c52ccfe85a53841134fbafac8c960b

api.md

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha bd3b69bddc4bd05cbe4db16f2bfb69a86c293036

eslint-fix

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha f441985e79c85557f5e98c8a4f2c263bd8c53c0c

eslint-fix

view details

push time in 2 months

Pull request review commentpuppeteer/puppeteer

feat(page): support IdleOverrides

+/**+ * Copyright 2020 Google Inc. All rights reserved.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *     http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import expect from 'expect';+import {+  getTestState,+  setupTestBrowserHooks,+  setupTestPageAndContextHooks,+} from './mocha-utils'; // eslint-disable-line import/extensions++describe('setIdleOverride', () => {+  setupTestBrowserHooks();+  setupTestPageAndContextHooks();++  after(async () => {+    const { page } = getTestState();+    await page.clearIdleOverride();+  });++  async function getIdleState() {+    const { page } = getTestState();++    const stateElement = await page.$('#state');+    return await page.evaluate((e: HTMLElement) => {

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(page): support IdleOverrides

 class ChromeLauncher implements ProductLauncher {       '--enable-automation',       '--password-store=basic',       '--use-mock-keychain',+      '--enable-blink-features=IdleDetection',

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 4d7d6acc42ca8723ec526eb55456b8fa242fe166

renaming + todo

view details

push time in 2 months

Pull request review commentpuppeteer/puppeteer

feat(page): support IdleOverrides

+<!DOCTYPE html>+<div id="state"></div>+<script>+  const elState = document.querySelector('#state');+  function setState(msg) {+    elState.textContent = msg;+  }+  async function main() {+    const controller = new AbortController();+    const signal = controller.signal;+    const idleDetector = new IdleDetector({+      threshold: 60000,+      signal,+    });+    idleDetector.addEventListener('change', () => {+      const userState = idleDetector.userState;+      const screenState = idleDetector.screenState;+      setState(`Idle state: ${userState}, ${screenState}.`);+    });+    idleDetector.start();+  }+  main();+</script>

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 5718a4a205d4a0f16c10932a2a5d228c4d26252a

trailing newline

view details

push time in 2 months

Pull request review commentpuppeteer/puppeteer

feat(page): support IdleOverrides

 export class Page extends EventEmitter {     }   } +  /**+   * Overrides the Idle state.+   *+   * @example+   * ```js+   * await page.setIdleOverride({isUserActive: true, isScreenUnlocked: false});+   * ```+   *+   * @param isUserActive Mock isUserActive+   * @param isScreenUnlocked Mock isScreenUnlocked+   */+  async setIdleOverride(+    isUserActive: boolean,+    isScreenUnlocked: boolean+  ): Promise<void> {+    await this._client.send('Emulation.setIdleOverride', {+      isUserActive,+      isScreenUnlocked,+    });+  }++  /**+   * Clears Idle state overrides.+   *+   * @example+   * ```js+   * await page.setIdleOverride({isUserActive: true, isScreenUnlocked: false});+   * // do some checks here+   * await page.clearIdleOverride();+   * ```+   */+  async clearIdleOverride(): Promise<void> {

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(page): support IdleOverrides

 export class Page extends EventEmitter {     }   } +  /**+   * Overrides the Idle state.+   *+   * @example+   * ```js+   * await page.setIdleOverride({isUserActive: true, isScreenUnlocked: false});+   * ```+   *+   * @param isUserActive Mock isUserActive+   * @param isScreenUnlocked Mock isScreenUnlocked+   */+  async setIdleOverride(

done

sadym-chromium

comment created time in 2 months

PullRequestReviewEvent

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 84856c6c48588ef9e5ff9791d4967de05b332eda

updated new-docs

view details

push time in 2 months

push eventsadym-chromium/puppeteer

Maksim Sadym

commit sha 0dd9021028782d3bf5e949d9baada89e2cb50edf

rename setIdleOverride to emulateIdleState

view details

push time in 2 months

PR opened puppeteer/puppeteer

Reviewers
feat(page): support IdleOverrides
  • https://bugs.chromium.org/p/chromium/issues/detail?id=1090802
  • added page.setIdleOverride(...);
  • added page.clearIdleOverride();
  • added tests;
  • added launch argument --enable-blink-features=IdleDetection to turn IdleDetection on.
+196 -0

0 comment

7 changed files

pr created time in 2 months

more