问题描述
我正在从本机应用程序开始的应用程序上运行排毒,现在将其作为本机应用程序和本机代码的组合。
我正在使用iOS模拟器检查测试。
我的应用程序是从iOS本机端开始的,并且在其上运行了排毒测试并获取了元素(一切正常),但是随着应用程序流程的进行,首先加载bundle(索引)。 js-(用于运行react-native端),我们无法通过排毒访问元素(在native端),并且测试失败。
在本机端(iOS)中,我输入了-accessibilityIdentifier
describe('Previews',() => {
beforeAll(async () => {
await device.launchApp({ permissions: {notifications: 'YES',location:'always'}});
});
it('should tap on acceptButton',async () => {
await element(by.id('acceptButton')).tap();
});
it('should tap on enable Notifications button',async () => {
await element(by.id('enableNotificationsButton')).tap();
});
// Here the bundle of the react-native loading,and the detox can't find 'editButton'
// 'editButton' it's still in the native side
it('should click on editButton',async() => {
await element(by.id('editButton')).toBeVisible();
});
});
得到此警告:
detox[73960] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = 6) invoke: {"type":"action","action":"tap","predicate":{"type":"id","value":"continueFaceIdButton"}}
Unresponded network requests might result in timeout errors in Detox tests.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)