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
Copy file name to clipboardexpand all lines: examples/cdp_mode/ReadMe.md
+36-34
Original file line number
Diff line number
Diff line change
@@ -22,28 +22,30 @@
22
22
* Backwards compatibility for existing UC Mode scripts.
23
23
* More configuration options when launching browsers.
24
24
* More methods. (And bug-fixes for existing methods.)
25
+
*`PyAutoGUI` integration for advanced stealth abilities.
25
26
* Faster response time for support. (Eg. [Discord Chat](https://discord.gg/EdhQTn3EyE))
26
27
27
28
--------
28
29
29
-
### 🐙 <btranslate="no">CDP Mode</b> usage:
30
+
### 🐙 <btranslate="no">CDP Mode</b> Usage:
30
31
31
32
***`sb.activate_cdp_mode(url)`**
32
33
33
34
> (Call that from a **UC Mode** script)
34
35
35
36
That disconnects WebDriver from Chrome (which prevents detection), and gives you access to `sb.cdp` methods (which don't trigger anti-bot checks).
36
37
37
-
### 🐙 Here are some common `sb.cdp` methods:
38
+
### 🐙 Here are a few common `sb.cdp` methods:
38
39
39
40
*`sb.cdp.click(selector)`
40
41
*`sb.cdp.click_if_visible(selector)`
42
+
*`sb.cdp.gui_click_element(selector)`
41
43
*`sb.cdp.type(selector, text)`
42
44
*`sb.cdp.press_keys(selector, text)`
43
45
*`sb.cdp.select_all(selector)`
44
46
*`sb.cdp.get_text(selector)`
45
47
46
-
When `type()` is too fast, use the slower `press_keys()` to avoid detection. You can also use `sb.sleep(seconds)` to slow things down.
48
+
When `type()` is too fast, use the slower `press_keys()` to avoid detection. You can also use `sb.sleep(seconds)` to slow things down. Methods that start with `sb.cdp.gui` use `PyAutoGUI` for interaction.
47
49
48
50
To use WebDriver methods again, call:
49
51
@@ -63,17 +65,13 @@ To find out if WebDriver is connected or disconnected, call:
(<b>Note:</b> Extra <codetranslate="no">sb.sleep()</code> calls have been added to prevent bot-detection because some sites will flag you as a bot if you perform actions too quickly.)
298
297
299
298
(<b>Note:</b> Some sites may IP-block you for 36 hours or more if they catch you using regular <spantranslate="no">Selenium WebDriver</span>. Be extra careful when creating and/or modifying automation scripts that run on them.)
300
299
301
300
--------
302
301
303
-
### 🐙 CDP Mode API / Methods
302
+
### 🐙 <btranslate="no">CDP Mode</b> API / Methods
304
303
305
304
(Some method args have been left out for simplicity. Eg: <codetranslate="no">timeout</code>)
0 commit comments