我使用下面的代码打开一个新的 chrome 浏览器窗口。当我运行代码时,它总是在现有选项卡中打开一个新页面。
import webbrowser
import pyautogui
url = 'google.com'
chrome_path = r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
webbrowser.register('chrome', None, webbrowser.BackgroundBrowser(chrome_path))
webbrowser.get('chrome').open_new(url)
print(pyautogui.position())
Run Code Online (Sandbox Code Playgroud)
有人可以建议如何打开一个新选项卡吗?