📄
CDP-Patches Documentation
Github Repository
  • Installation
  • Input
    • Sync Usage
    • Async Usage
    • Selenium Usage
    • Playwright Usage
Powered by GitBook
On this page

Input

PreviousInstallationNextSync Usage

Last updated 1 year ago

Concept: Input Domain Leaks

Bypass CDP-Leaks in domains. For an interaction event e, the page coordinates won't ever equal the screen coordinates, unless Chrome is in full-screen. However, all CDP input commands just set it the same by default (see ).\

var is_bot = (e.pageY == e.screenY && e.pageX == e.screenX)
if (is_bot && 1 >= outerHeight - innerHeight){ // fullscreen
    is_bot = false
}

Because Chrome does not recognize Input Events to specific tabs, these methods can only be used on the active tab.

Chrome Tabs do have their own process with a process id (PID), but these can not be controlled using Input Events as they´re just engines.

Pressing SHIFT or CAPSLOCK manually on Windows affects input.type(text) as well.


Owner: Co-Maintainer:

Input
crbug#1477537
Vinyzu
Kaliiiiiiiiii