admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Fixed issue [setOrientation("landscape")]/ [setOrientation("portrait")] Error response status: 777 #448

Closed khanhdodang closed 7 years ago

khanhdodang commented 7 years ago

As documentation, we can use setOrientation with two values landscape and portrait to rotate on devices.

  1. I use two commands below and run pass with Xcode 7 & Appium 1.5.3.

    .setOrientation('landscape')
    .setOrientation('portrait')
  2. It doesn't work with the Xcode version 8.1 & Appium 1.6.0. It throws errors:

     Uncaught Error: [setOrientation("landscape")] Error response status: 777
      at exports.newError (node_modules/wd/lib/utils.js:139:13)
      at node_modules/wd/lib/callbacks.js:33:23
      at node_modules/wd/lib/webdriver.js:174:5
      at Request._callback (node_modules/wd/lib/http-utils.js:87:7)
      at Request.self.callback (node_modules/wd/node_modules/request/request.js:368:22)
      at Request.<anonymous> (node_modules/wd/node_modules/request/request.js:1219:14)
      at IncomingMessage.<anonymous> (node_modules/wd/node_modules/request/request.js:1167:12)
      at endReadableNT (_stream_readable.js:974:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)
khanhdodang commented 7 years ago

Hi @admc, Could you please review this PR, Adam? Thanks, Khanh Do