使用 Calabash 打开和关闭飞行模式的最佳方式

sli*_*000 0 calabash calabash-android

使用calabash-android打开和关闭飞行模式的最佳方法是什么?

可以用perform_action('set_preferences', .... )吗??

上面的 set_preferences 做了什么?我想在应用程序测试期间设置 android 设置。

谢谢

小智 5

你的问题有点含糊。它是用于模拟器还是设备?

如果您只需要禁用 wifi,您可以使用

def disable_network
%x(adb shell svc wifi disable)
end


def enable_network
%x(adb shell svc wifi enable)
end
Run Code Online (Sandbox Code Playgroud)

在这里找到https://azevedorafaela.wordpress.com/tag/disable-wifi-android-simulator-calabash/ 我自己还没有尝试过。