Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protractor : WebDriverError: unknown error: operation is unsupported on Android

I am trying to run protractor tests on real device (Android Phone, Android 5.0.1 version). It is opening the browser (Chrome) but not navigating to the url and throwing below error message.

super(opt_error);
         ^
WebDriverError: unknown error: operation is unsupported on Android
  (Session info: chrome=49.0.2623.105)
  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64).

Here is code from conf js ( pasing only required code ):

seleniumAddress: 'http://localhost:4723/wd/hub',

   capabilities: {
     browserName: 'chrome',
     platformName: 'android',
     deviceName: ' ',
   },
   framework: 'jasmine2',
   specs: ['../functional/AppLogin.js'],

Actual Spec code:

describe("Verify Login", function(){
     it("Verify Application Login",function(){
         browser.get("http://juliemr.github.io/protractor-demo/");
     });
});

Note: Device connected to system properly, Appium node server running fine.

like image 254
user6172758 Avatar asked Apr 07 '16 15:04

user6172758


1 Answers

I had the same issue and the problem was that I was trying to set the window size of the browser, and this cannot be done when running on a real device. This was the line which was causing the issue:

browser.driver.manage().window().setSize(400, 800);
like image 200
dwane_d Avatar answered Oct 14 '22 16:10

dwane_d