Change network while running

hello everyone
I want to change wifi in the middle of a test run.
Because there are websites I access that only load on this wifi
Can this be done?


It seems, that you can change network on Android through adb

adb shell cmd -w wifi connect-network Home wpa2 qwertyuiop
So, you can try call this by

driver.execute_script('mobile: shell', {
            'command': 'cmd -w wifi connect-network Home wpa2 qwertyuiop',
            'includeStderr': True,
            'timeout': 50000