簡體   English   中英

在硒網格上運行測試時無法調整Chrome窗口大小的大小

[英]Unable to resize the chrome window size when tests running on selenium Grid

當在Selenium Grid上以C#編寫測試時,嘗試將遠程chrome瀏覽器最大化到特定大小時,我面臨一個問題。
我嘗試了以下選項

  • options.AddArgument(“-window-size = 1920,1080”);
  • Driver.Manage()。Window.Size = new Size(1920,1080);

但是,瀏覽器無法最大化。

誰能幫幫我嗎?

嘗試這個:

                ChromeOptions options = new ChromeOptions();
                options.AddArguments("--disable-extensions");
                _webDriver = new ChromeDriver("c:\path"), options);
                _wait = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10));
                _webDriver.Manage().Window.Maximize();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM