Sleep after the B2G process is restarted, not before
Added support for connecting to a wifi network using test variables