def logged_in_client(user='test', passwd='test', client=None):
 if (client is None):
  client = WindmillTestClient(__name__)
 client.open(url=(windmill.settings['TEST_URL'] + '?clearSession=true'))
 client.waits.forPageLoad()
 client.waits.forElement(classname='hue-loaded')
 if client.execJS(js="!!$('hue-login')")['output']:
  client.waits.forElement(classname='hue-username')
  client.click(jquery='(".hue-username")[0]')
  client.type(classname='hue-username', text=user)
  client.click(classname='hue-password')
  client.type(classname='hue-password', text=passwd)
  client.click(classname='hue-continue')
 time.sleep(2.0)
 client.waits.forElement(classname='loggedIn', timeout='20000')
 return client

def logged_in_client ( user = 'test' , passwd = 'test' , client = None ) : if ( client is None ) : client = WindmillTestClient ( __name__ ) client . open ( url = ( windmill . settings [ 'TEST_URL' ] + '?clearSession=true' ) ) client . waits . forPageLoad ( ) client . waits . forElement ( classname = 'hue-loaded' ) if client . execJS ( js = "!!$('hue-login')" ) [ 'output' ] : client . waits . forElement ( classname = 'hue-username' ) client . click ( jquery = '(".hue-username")[0]' ) client . type ( classname = 'hue-username' , text = user ) client . click ( classname = 'hue-password' ) client . type ( classname = 'hue-password' , text = passwd ) client . click ( classname = 'hue-continue' ) time . sleep ( 2.0 ) client . waits . forElement ( classname = 'loggedIn' , timeout = '20000' ) return client
opens up the root url .