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?

thanks

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

adb shell cmd -w wifi connect-network Home wpa2 qwertyuiop

https://stackoverflow.com/a/73036039
So, you can try call this by

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