使用量角器抛出错误测试Android Native App(计算器)

时间:2016-09-26 13:40:59

标签: javascript android node.js protractor appium

我想使用量角器在Android上自动化原生应用(计算器应用)。当我尝试使用以下配置时,我在应用程序启动和关闭后收到此错误:

  

WebDriverError:方法尚未实施

有解决方案吗?这是我的代码:

exports.config = {
seleniumAddress: 'http://localhost:4723/wd/hub',

specs: ['spec.js'],
capabilities:{
    'appium-version': '1.5.3',
     platformName: 'Android',
     platformVersion: '5.1.1',
     deviceName: 'Nexus 5',
     browserName: "android",         
     appPackage: 'com.android.calculator2',
     appActivity: '.Calculator',
     newCommandTimeout: 6000,        
     fulReset: true
}
onPrepare: function () {
    var wd = require('wd'),
        protractor = require('protractor'),
        wdBridge = require('wd-bridge')(protractor, wd);
    wdBridge.initFromProtractor(exports.config);
}
};

it("",function(){
   element(by.id('com.android.calculator2:id/digit_7')).click();
    element(by.name('minus')).click();
    element(by.id('com.android.calculator2:id/digit_3')).click();
    element(by.name('equals')).click();
});

0 个答案:

没有答案