#NEWLINE# @ orientation . setter #NEWLINE# def orientation( self , value ) : #NEWLINE# #INDENT# "\n        Sets the current orientation of the device\n\n        :Args:\n         - value: orientation to set it to.\n\n        :Usage:\n            driver.orientation = 'landscape'\n        " #NEWLINE# allowed_values = [ 'LANDSCAPE' , 'PORTRAIT' ] #NEWLINE# if ( value . upper ( ) in allowed_values ) : #NEWLINE# #INDENT# self . execute ( Command . SET_SCREEN_ORIENTATION , { #NEWLINE# #INDENT# 'orientation' : allowed_values , #NEWLINE# #UNINDENT# } ) [ 'value' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise WebDriverException ( "You can only set the orientation to 'LANDSCAPE' and 'PORTRAIT'" )