启动浏览器实例添加窗口位置参数

This commit is contained in:
fofolee
2025-02-24 13:12:02 +08:00
parent 0e43a3eac8
commit 28b7225c4d
2 changed files with 12 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ const startClient = async (options) => {
proxy = null,
browserPath = getBrowserPath(browserType),
windowSize = null,
windowPosition = null,
incognito = false,
headless = false,
disableExtensions = false,
@@ -150,6 +151,7 @@ const startClient = async (options) => {
const optionArgs = [
windowSize ? `--window-size=${windowSize}` : "--start-maximized",
windowPosition ? `--window-position=${windowPosition}` : "",
proxy ? `--proxy-server=${proxy}` : "",
incognito ? incognitoArg[browserType] : "",
headless ? "--headless" : "",