How to make mobile goes offline?

Hi, I have some test scenarios that require the application/mobile to be tested under offline condition. Is there any command or keyword that I can make mobile offline? Thanks!

Hi @wayne.yong,

Please try this script to toggle wifi off:


1 Like

Hi @duyluong,

Thank you for answering, could I where to get the documentation or resources that. Thanks again.:blush:


You can get from Appium’s official document:

MobileDriverFactory.getDriver() // will return the Appium driver
1 Like