繁体   English   中英

如何使用C#Selenium在移动模拟器横向模式下启动Chrome?

[英]How to launch Chrome in mobile emulator Landscape mode using C# Selenium?

我能够使用此C#代码在移动人像模拟器模式下使用Chrome浏览器启动网页:

     ChromeOptions options = new ChromeOptions();

     options.AddArguments("disable-infobars");

    options.AddArguments("start-maximized");

    options.EnableMobileEmulation("Galaxy S5");

     IWebDriver driver = new ChromeDriver(options);

     driver.Navigate().GoToUrl("https://www.udemy.com");

我想在移动横向模拟器模式下启动相同的页面,但无法找到解决方案。 有使用Java,Ruby和Python的解决方案,但我需要C#的解决方案。

我只想在Landscape模拟器模式下使用.NET C#Selenium启动Chrome浏览器。 能否请你帮忙?

在Appium Studio中,它是这样的

client.deviceAction("Portrait");

有关详细说明,您可以查看他们的文档。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM