Set screen orientation at the start of your test
Ruby
Python
PHP
Java
Node
C#
desired_caps = {
'orientation' : 'LANDSCAPE'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities ();
desiredCapabilities . setCapability ( "orientation" , "LANDSCAPE" );
$capabilities = new DesiredCapabilities ();
$capabilities -> setCapability ( "orientation" , "LANDSCAPE" );
desired_cap = {
' orientation ' : ' LANDSCAPE '
}
var capabilities = {
' orientation ' : ' LANDSCAPE ' ,
}
DesiredCapabilities capability = new DesiredCapabilities ();
capability . SetCapability ( "orientation" , "LANDSCAPE" );
Set screen orientation during a test
Ruby
Python
PHP
Java
Node
C#
@driver . rotation = :landscape
(( AppiumDriver ) driver ). rotate ( ScreenOrientation . LANDSCAPE );
// not yet supported
driver . orientation = " LANDSCAPE "
driver . setOrientation ( ' LANDSCAPE ' );
driver . Orientation = ScreenOrientation . Landscape ;