-
I'm trying to automate input into a date field using SeleniumBase with CDP mode. Here's what I'm doing:
I also tried using element.clear_input(), but that didn't work either. Interestingly, this alternative does work:
Any ideas why type with send_keys doesn’t clear/replace the value properly in CDP mode? Would appreciate insights or workarounds! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The However, you activated CDP Mode, which means you can only use the CDP API because Selenium was removed when the WebDriver was disconnected from the browser. To use Selenium commands again after activating CDP Mode, you need to call |
Beta Was this translation helpful? Give feedback.
The
Keys
library fromselenium.webdriver.common.keys
is for Selenium commands only.However, you activated CDP Mode, which means you can only use the CDP API because Selenium was removed when the WebDriver was disconnected from the browser.
To use Selenium commands again after activating CDP Mode, you need to call
sb.connect()
. This reconnects WebDriver to the browser (but it also makes your bot detectable because Selenium is detectable).