python - Setting up Chrome desired caps -


i need set desired caps chrome. code made android device, need change desired caps make work same web browser chrome, not android.

def setup(self):     print('setup')     print('serial %s'%self.serial)     self.dbinstance = dbconnection()     if not self.dbinstance.cfg:         print('cannot load db configuration file')         return      capabilities = getcapabilities(self.serial,self.dbinstance.db)      desired_caps = {}     desired_caps['platformname'] = 'android'     desired_caps['platformversion'] = capabilities.platform_version     desired_caps['devicename'] = capabilities.device_name     desired_caps['apppackage'] = capabilities.app_package     desired_caps['appactivity'] = capabilities.app_activity      self.driver = webdriver.remote('http://'+capabilities.appium_server+':'+capabilities.appium_port+'/wd/hub', desired_caps) 

so if change to:

def setup(self):     print('setup')     print('serial %s'%self.serial)     self.dbinstance = dbconnection()     if not self.dbinstance.cfg:         print('cannot load db configuration file')         return      capabilities = getcapabilities(self.serial, self.dbinstance.db)      desired_caps = {}     desired_caps['platformname'] = 'web'     desired_caps['platformversion'] = capabilities.platform_version      self.driver = webdriver.remote(desired_capabilities=webdriver.desiredcapabilities.chrome)     driver.get("http://web.com/")     self.driver.implicitly_wait(30) 

it gives me error.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -