You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `interval` parameter is deprecated. Use the default `humanize=True` for realistic typing.
201
+
The `interval` parameter is deprecated. Pass `humanize=True` for realistic typing.
202
202
203
203
### Natural Typing with Humanization
204
204
205
-
By default, `type_text()` uses humanized mode, simulating realistic human typing with variable speeds and occasional typos that are automatically corrected:
205
+
When `humanize=True` is passed, `type_text()` uses humanized mode, simulating realistic human typing with variable speeds and occasional typos that are automatically corrected:
206
206
207
207
```python
208
208
import asyncio
@@ -218,8 +218,8 @@ async def natural_typing():
218
218
219
219
# Variable speed: 30-120ms between keystrokes
220
220
# ~2% typo rate with realistic correction behavior
221
-
await username_field.type_text("john.doe@example.com") #humanize=True by default
Copy file name to clipboardExpand all lines: docs/en/features/automation/mouse-control.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Mouse Control
2
2
3
-
The Mouse API provides complete control over mouse input at the page level, enabling you to simulate realistic cursor movement, clicks, double-clicks, and drag operations. By default, all mouse operations use humanized simulation: paths follow natural Bezier curves with Fitts's Law timing, minimum-jerk velocity profiles, physiological tremor, and overshoot correction, making automation virtually indistinguishable from human behavior.
3
+
The Mouse API provides complete control over mouse input at the page level, enabling you to simulate realistic cursor movement, clicks, double-clicks, and drag operations. When `humanize=True` is passed, mouse operations use humanized simulation: paths follow natural Bezier curves with Fitts's Law timing, minimum-jerk velocity profiles, physiological tremor, and overshoot correction, making automation virtually indistinguishable from human behavior.
4
4
5
5
!!! info "Centralized Mouse Interface"
6
6
All mouse operations are accessible via `tab.mouse`, providing a clean, unified API for all mouse interactions.
@@ -15,10 +15,10 @@ async with Chrome() as browser:
15
15
tab =await browser.start()
16
16
await tab.go_to('https://example.com')
17
17
18
-
# Move cursor to position (humanized by default)
18
+
# Move cursor to position
19
19
await tab.mouse.move(500, 300)
20
20
21
-
# Click at position (humanized by default)
21
+
# Click at position
22
22
await tab.mouse.click(500, 300)
23
23
24
24
# Right-click
@@ -38,18 +38,18 @@ async with Chrome() as browser:
38
38
Move the mouse cursor to a specific position on the page:
39
39
40
40
```python
41
-
#Humanized move (default, curved path with natural timing)
41
+
#Default move (single CDP event, no simulation)
42
42
await tab.mouse.move(500, 300)
43
43
44
-
#Instant move (single CDP event, no simulation)
45
-
await tab.mouse.move(500, 300, humanize=False)
44
+
#Humanized move (curved path with natural timing)
45
+
await tab.mouse.move(500, 300, humanize=True)
46
46
```
47
47
48
48
**Parameters:**
49
49
50
50
-`x`: Target X coordinate (CSS pixels)
51
51
-`y`: Target Y coordinate (CSS pixels)
52
-
-`humanize` (keyword-only): Simulate human-like curved movement (default: `True`)
52
+
-`humanize` (keyword-only): Simulate human-like curved movement (default: `False`)
53
53
54
54
### click: Click at Position
55
55
@@ -58,7 +58,7 @@ Move to position and perform a mouse click:
58
58
```python
59
59
from pydoll.protocol.input.types import MouseButton
All mouse methods default to `humanize=True`. To perform instant, non-humanized operations, pass `humanize=False`:
129
+
All mouse methods default to `humanize=False`. To enable humanized simulation with natural Bezier curve paths and realistic timing, pass `humanize=True`:
130
130
131
131
```python
132
-
#Instant move, single CDP mouseMoved event
133
-
await tab.mouse.move(500, 300, humanize=False)
132
+
#Humanized move, natural curved path with Fitts's Law timing
133
+
await tab.mouse.move(500, 300, humanize=True)
134
134
135
-
#Instant click: move + press + release, no simulation
This is useful when speed is critical and detection evasion is not a concern, for example in testing environments or internal tools.
142
+
This is recommended when detection evasion is important, for example when interacting with sites that employ bot detection.
143
143
144
144
## Humanized Mode
145
145
146
-
When `humanize=True`(the default), the mouse module applies multiple layers of realism:
146
+
When `humanize=True`is passed, the mouse module applies multiple layers of realism:
147
147
148
148
### Bezier Curve Paths
149
149
@@ -171,18 +171,18 @@ Humanized clicks include a pre-click pause (50–200ms) that simulates the natur
171
171
172
172
## Automatic Humanized Element Clicks
173
173
174
-
When you use `element.click()`, the Mouse API is automatically used to produce a realistic Bezier curve movement from the current cursor position to the element center before clicking. This means every `element.click()` call generates natural mouse movement, making element clicks indistinguishable from human behavior.
174
+
When you use `element.click(humanize=True)`, the Mouse API is used to produce a realistic Bezier curve movement from the current cursor position to the element center before clicking, making element clicks indistinguishable from human behavior.
175
175
176
176
```python
177
-
#Humanized click (default): Bezier curve movement + click
177
+
#Default click: raw CDP press/release
178
178
button =await tab.find(id='submit')
179
179
await button.click()
180
180
181
181
# With offset from center
182
182
await button.click(x_offset=10, y_offset=5)
183
183
184
-
#Disable humanization: raw CDP press/release, no cursor movement
185
-
await button.click(humanize=False)
184
+
#Humanized click: Bezier curve movement + click
185
+
await button.click(humanize=True)
186
186
```
187
187
188
188
Position tracking is maintained across element clicks. Clicking element A, then element B, produces a natural curved path from A's position to B.
Copy file name to clipboardExpand all lines: docs/pt/features/automation/human-interactions.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ Um dos principais diferenciais entre uma automação bem-sucedida e bots facilme
5
5
!!! info "Status das Funcionalidades"
6
6
**Já Implementado:**
7
7
8
-
- **Teclado Humanizado**: Velocidade de digitação variável, erros realistas com correção automática (`humanize=True`)
9
-
- **Scroll Humanizado**: Rolagem baseada em física com momentum, fricção, jitter e overshoot (`humanize=True`)
10
-
- **Mouse Humanizado**: Trajetórias com curvas de Bezier, temporização pela Lei de Fitts, velocidade minimum-jerk, tremor e overshoot (`humanize=True`)
8
+
- **Teclado Humanizado**: Velocidade de digitação variável, erros realistas com correção automática (passe `humanize=True`)
9
+
- **Scroll Humanizado**: Rolagem baseada em física com momentum, fricção, jitter e overshoot (passe `humanize=True`)
10
+
- **Mouse Humanizado**: Trajetórias com curvas de Bezier, temporização pela Lei de Fitts, velocidade minimum-jerk, tremor e overshoot (passe `humanize=True`)
11
11
12
12
**Em Breve:**
13
13
@@ -195,14 +195,14 @@ A API de teclado do Pydoll fornece dois modos de digitação para equilibrar vel
195
195
!!! info "Entendendo os Modos de Digitação"
196
196
| Modo | Parâmetros | Comportamento | Caso de Uso |
| **Padrão (Humanizado)** | `humanize=True` | Timing variável, ~2% de taxa de erros com correção automática | **Evasão anti-bot** (padrão) |
199
-
| **Rápido** | `humanize=False` | Intervalos fixos de 50ms, sem erros | Cenários de velocidade, baixo risco |
198
+
| **Padrão (Rápido)** | `humanize=False` | Intervalos fixos de 50ms, sem erros | Cenários de velocidade, baixo risco (padrão) |
199
+
| **Humanizado** | `humanize=True` | Timing variável, ~2% de taxa de erros com correção automática | **Evasão anti-bot** |
200
200
201
-
O parâmetro `interval` está obsoleto. Use o padrão `humanize=True` para digitação realista.
201
+
O parâmetro `interval` está obsoleto. Passe `humanize=True` para digitação realista.
202
202
203
203
### Digitação Natural com Humanização
204
204
205
-
Por padrão, `type_text()` usa modo humanizado, simulando digitação humana realista com velocidades variáveis e erros ocasionais que são corrigidos automaticamente:
205
+
Quando `humanize=True` é passado, `type_text()` usa modo humanizado, simulando digitação humana realista com velocidades variáveis e erros ocasionais que são corrigidos automaticamente:
206
206
207
207
```python
208
208
import asyncio
@@ -218,8 +218,8 @@ async def natural_typing():
218
218
219
219
# Velocidade variável: 30-120ms entre teclas
220
220
# ~2% de taxa de erros com comportamento de correção realista
221
-
await username_field.type_text("john.doe@example.com") #humanize=True por padrão
0 commit comments