我试图(太长时间...)得到appium与反应原生工作,但似乎无法找到任何元素。React native + Appium,如何找到一个元素
我正在使用模拟器,Nexus 6,Android 6.0,Ubuntu,Appium 1.6.0,RN 0.39.2。
我试图获得最基本的例子的工作:
// foo.js
render() {
return (
<Text>foo</Text>
)
}
// spec.js
// ... some setup ...
driver
.elementByAccessibilityId('foo')
.click()
和我越来越...
1) should be able to find 'Buttons' and click it
0 passing (13s)
1 failing
1) Android find and click should be able to find 'Buttons' and click it:
Error: [elementByAccessibilityId("foo")] Error response status: 7, , NoSuchElement - An element could not be located on the page using the given search parameters. Selenium error: An element could not be located on the page using the given search parameters.
我也试着设置: <Text accessible accessibilityLabel={ 'foo' }>foo</Text>
同样的回应...
有什么想法吗?
你会怎么做,如果你有一个React-Native slideOutMenu,你想点击其中一个slideOutMenu选项。特别是当滑出菜单仅覆盖其后面50%的屏幕时。 XCODE的AccessibilityInspector会看到滑出菜单,但android和ios的appium accessibilty inspector甚至不会看到滑出菜单。 – duncwa