Skip to content
Discussion options

You must be logged in to vote

If you're looking to use async/await with SeleniumBase CDP Mode, there's an async format. Eg:

import asyncio import time from seleniumbase.undetected import cdp_driver async def main(): driver = await cdp_driver.cdp_util.start_async() page = await driver.get("about:blank") await page.set_locale("en") await page.get("https://www.priceline.com/") time.sleep(3) print(await page.evaluate("document.title")) element = await page.select('[data-testid*="endLocation"]') await element.click_async() time.sleep(1) await element.send_keys_async("Boston") time.sleep(2) if __name__ == "__main__": loop = asyncio.new_event_loop() loop.run_until_complete(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants