C# 使用Appium和C更改设备方向#
是否有一种方法可以改变方向,例如使用以下驾驶员等级:C# 使用Appium和C更改设备方向#,c#,selenium,automation,appium,C#,Selenium,Automation,Appium,是否有一种方法可以改变方向,例如使用以下驾驶员等级: private void SetDeviceOrientation(string mode) { switch (mode) { case ("Landscape"): driver.Rotate(ScreenOrientation.Landscape); 关于设置屏幕旋转的说明表明这应该是可能的。您应该将
private void SetDeviceOrientation(string mode)
{
switch (mode)
{
case ("Landscape"):
driver.Rotate(ScreenOrientation.Landscape);
关于设置屏幕旋转的说明表明这应该是可能的。您应该将“横向”改为大写。通过研究github上的appium存储库,ScreenOrientionExtension类将其称为“景观” 使用以下命令,并支持C#驱动程序 你可以用
driver.Orientation = ScreenOrientation.Landscape;
driver.Orientation = ScreenOrientation.Landscape;