My tunnel is active, still I receive “This site can’t be reached” for my automation test

My tests are running fine in Real Time Testing with tunnel, when I run automation test, I get error “This site can’t be reached”

Please ensure that you have added the tunnel capability in your test script.Ex: capabilities.setCapability(“tunnel”,true);