CDP Methods Usage #4416
-
|
Hi, @mdmintz , how’s it going? I’d like to know whether I need to use I’ve noticed that in several examples, you still uses regular SeleniumBase methods after activating CDP Mode, instead of switching everything to So my question is: when CDP Mode is activated, is it recommended to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hello @nilsinhojrx, When CDP Mode is activated, SeleniumBase methods automatically redirect to Eg. Most SeleniumBase methods have a CDP Mode counterpart. |
Beta Was this translation helpful? Give feedback.
Hello @nilsinhojrx,
When CDP Mode is activated, SeleniumBase methods automatically redirect to
sb.cdpas long as you're not using a WebDriver-specific method.Eg.
sb.click(selector)redirects tosb.cdp.click(selector),sb.type(selector, text)redirects tosb.cdp.type(selector, text),but
sb.execute_cdp_cmd(script)is a WebDriver-only method because it usessb.driver.execute_cdp_cmd(script), so that one won't have stealth.Most SeleniumBase methods have a CDP Mode counterpart.
Here's the list of CDP Mode methods: help_docs/cdp_mode_methods.md