Appium能否自动化构建在Titanium Appcelerator上的移动应用程序?

时间:2017-05-10 09:54:04

标签: titanium appium titanium-mobile appcelerator-titanium appcelerator-mobile

我尝试使用Titanium Appcelerator自动化App版本。 当我使用UIAutomator检查元素时,我无法找到资源ID。我使用路径作为解决方法,但这不是一个长期的解决方案。

有没有人使用过Appcelerator和Appium并能够帮助我?

1 个答案:

答案 0 :(得分:0)

绝对可以将Appium与Appcelerator Titanium一起使用!关键是在视图上使用accessibilityLabel属性。

即。 <Label id="label1" accessibilityLabel="label1" text="I am label1" />

然后你可以在Appium测试中做这样的事情:

it('should have label1', function() {
    return driver
        .elementByAccessibilityId('label1')
        .should.eventually.exist
        .getAttribute('value')
        .should.become('I am label1');
});

如果您对此有任何疑问,请与我们联系!我可能会在一起blog post about it here,因为我知道很多其他开发者都有同样的问题。