Skip to content

Freezing browser when opening new tabs in Pure CDP Mode #4099

@mdmintz

Description

@mdmintz

Freezing browser when opening new tabs in Pure CDP Mode

This freezes: (Pure CDP Mode)

from seleniumbase import sb_cdp

sb = sb_cdp.Chrome()
sb.open("data:text/html,<h1>Page A</h1>")
sb.assert_text("Page A")
sb.open_new_tab()
sb.open("data:text/html,<h1>Page B</h1>")
sb.assert_text("Page B")
sb.switch_to_tab(0)
sb.assert_text("Page A")
sb.assert_text_not_visible("Page B")
sb.switch_to_tab(1)
sb.assert_text("Page B")
sb.assert_text_not_visible("Page A")
sb.driver.stop()

This works: (Regular CDP Mode)

from seleniumbase import SB

with SB(uc=True, test=True) as sb:
    sb.activate_cdp_mode()
    sb.open("data:text/html,<h1>Page A</h1>")
    sb.assert_text("Page A")
    sb.open_new_tab()
    sb.open("data:text/html,<h1>Page B</h1>")
    sb.assert_text("Page B")
    sb.switch_to_tab(0)
    sb.assert_text("Page A")
    sb.assert_text_not_visible("Page B")
    sb.switch_to_tab(1)
    sb.assert_text("Page B")
    sb.assert_text_not_visible("Page A")

Metadata

Metadata

Assignees

Labels

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions