Skip to content

Commit dc2eb0e

Browse files
committed
Patch a Playwright bug from CDP Mode
1 parent f2ce01f commit dc2eb0e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

seleniumbase/core/sb_cdp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,13 @@ def get_rd_url(self):
184184
and also applies nest-asyncio for nested event loops so
185185
that SeleniumBase methods can be called from Playwright
186186
without encountering event loop error messages such as:
187-
Cannot run the event loop while another loop is running."""
187+
Cannot run the event loop while another loop is running.
188+
Also sets an environment variable to hide this warning:
189+
Deprecation: "url.parse() behavior is not standardized".
190+
(github.com/microsoft/playwright-python/issues/3016)"""
188191
import nest_asyncio
189192
nest_asyncio.apply()
193+
os.environ["NODE_NO_WARNINGS"] = "1"
190194
driver = self.driver
191195
if hasattr(driver, "cdp_base"):
192196
driver = driver.cdp_base

0 commit comments

Comments
 (0)