Open alkimake opened 1 year ago
Thanks @alkimake. We've contemplated introducing that into our official API's in the past (long ago), I'm having trouble recalling why we eventually decided not to do so. In any case, I'm putting this down as a contribute-able issue. I think a more suitable API for this would be:
device.adb.shell('svc wifi disable');
I'm somewhat reluctant to allow for non-shell commands because the support for them are not uniform across the various devices (i.e. google emulators, vs. Genymotion local vs. Genymotion-cloud vs. real devices)
Hello! We appreciate you bringing this issue to our attention. It looks like this could be a valuable addition or fix to our project. We believe that this feature would benefit greatly from contributions from the community, even from first-time contributors.
If you're interested in contributing to this feature, please take a look at our contribution guide. It has all the information you need to know about how to submit a pull request and contribute to our project.
You're also welcome to join our Discord server and discuss this feature with the collaborators or other contributors under the channel 'contributions'.
Please feel free to reach out to us if you have any questions, or need help with anything. We appreciate your feedback and look forward to working with you!
Hi @d4vidi,
Thanks for quick reply. If i find a time i will try to make a PR with your suggested API.
Hi @d4vidi,
Thanks for quick reply. If i find a time i will try to make a PR with your suggested API.
Would be exciting to have!
You can do similar behaviour using
const cp = require('child_process');
cp.execSync('adb shell svc wifi diable')
Do we need an api for just that?
I'd correct @drmas: adb -s ${device.id} shell svc wifi disable
Some of the tests might need to run adb commands on the fly for the emulator that is already running. For example enabling and disabling WiFi, data...
It would be nice that
device
client API exports/exposesadbCmd
that has already implemented in android drivers.something like