def __init__(self, **kwargs): super(B2GTest, self).__init__(**kwargs) print "Setting up device" self.device.setupDHCP() self.device.setupMarionette() session = self.device.marionette.session if 'b2g' not in session: raise Exception("bad session value %s returned by start_session" % session) # unlock device, so it doesn't go to sleep ls = LockScreen(self.device.marionette) ls.unlock() # Wait for device to properly recognize network # (FIXME: this timeout is terrible, can we do check for network # connectivity with marionette somehow?) time.sleep(5) # reset orientation to default for this type of device self.device.resetOrientation()
def unlock(self): # unlock device, so it doesn't go to sleep ls = LockScreen(self.marionette) ls.unlock()