'python playwright i want control the same browser,when i use playwright develop?
I have come across a special website where I can only log in to one browser at a time, other people cannot log in again with the username and password。 So I need playwright to use the same browser as me, and can't clear cookies, if the cookies are lost, I can't log in to the website for development within 2 hours
I was using selenium before, I like the following parameters in selenium
# google start
chrome.exe --remote-debugging-port=888 --user-data-dir="H:\selenium"
# selenium connect chrome
options = webdriver.ChromeOptions()
options.add_experimental_option("debuggerAddress", "127.0.0.1:8888")
I have spent 3 days searching the playwright official website and google, but I can't find any relevant
from playwright.sync_api import sync_playwright
playwright=sync_playwright().start()
chromium=playwright.chromium.connect_over_cdp('http:127.0.0.1:8888')
context=chromium.new_context(accept_downloads=True)
page=context.new_page()
page.goto('https://passport.meituan.com/account/unitivelogin')
This shortcode still doesn't meet my needs
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
