Programmatically turn on/off wifi on real iOS device with UI Automation

前端 未结 2 663
误落风尘
误落风尘 2021-01-02 22:47

I have already read once or twice that turn on/off wifi on a real iOS device (iPad in my case) with a UI Automation script seems not possible.

I\'ve also read that y

相关标签:
2条回答
  • 2021-01-02 23:25

    i was able to do so (just make sure you target application is on foremost state when doing so):

    var target = UIATarget.localTarget();
    
    target.dragFromToForDuration({x:0.1, y:557.00}, {x:211.00, y:206.00},
    0.5); //to expose the actions panel on iOS
    
    target.frontMostApp().mainWindow().elements()["Wifi"].tapWithOptions({tapOffset:{x:0.44, y:0.47}});
    
    0 讨论(0)
  • 2021-01-02 23:32

    To do this, like @Larme states, the user's iOS device must be jailbroken due to the locked-down nature of iOS.

    0 讨论(0)
提交回复
热议问题