botasaurus icon indicating copy to clipboard operation
botasaurus copied to clipboard

Cannot type in parrallel browser due to browser overlap each other

Open RizwanSabir opened this issue 5 months ago • 0 comments

@browser(run_async=True) def google_search_and_click_sequential(driver: Driver, data=None): query = "httpbin ip httpbin org"

driver.enable_human_mode()
driver.get(data)

el = driver._tab.wait_for('textarea[name="q"]', timeout=40)
el.send_keys(query, press_enter=True)
mouseClick(driver)
time.sleep(2)
driver.wait_for_element("a h3", wait=20)
first_result = driver.select_all("a h3")[0]
first_result.click()
driver.short_random_sleep()

filename = f"screenshot_{uuid.uuid4().hex}.png"
driver.save_screenshot(filename)

return {"screenshot": filename}

URLs to process

urls = [ "https://www.google.com/", "https://www.google.com/", "https://www.google.com/" ]

RizwanSabir avatar Jul 27 '25 12:07 RizwanSabir