Ron*_*onE 11 javascript react-native detox
我正在尝试使用 Detox 单击“允许”按钮。
我尝试了以下方法:
我还尝试通过element(by.label('Allow')).tap()并且还针对“允许”按钮by.text
我不想在应用启动时设置位置权限。我想模拟允许和不允许位置权限的用户。
Jua*_*tiz 13
在您的init.js文件中,您可以允许以下权限:
beforeAll(async () => {
await detox.init(config, { launchApp: false });
await device.launchApp({newInstance: true, permissions: {notifications: 'YES'}});
});
Run Code Online (Sandbox Code Playgroud)
权限:
calendar=YES|NO
camera=YES|NO
contacts=YES|NO
health=YES|NO
homekit=YES|NO
location=always|inuse|never
medialibrary=YES|NO
microphone=YES|NO
motion=YES|NO
notifications=YES|NO
photos=YES|NO
reminders=YES|NO
siri=YES|NO
Run Code Online (Sandbox Code Playgroud)
您可以在此处查看文档:https : //github.com/wix/detox/blob/master/detox/test/e2e/13.permissions.test.js
| 归档时间: |
|
| 查看次数: |
2338 次 |
| 最近记录: |