Automate chrome apps

Chrome apps writ­ten using web­view are dif­fer­ent than iFrames because web­view is a sep­a­rate process.

With Sele­nium 2.20 it is pos­si­ble to auto­mate chrome apps writ­ten using webview.

driver = webdriver.Chrome(desired_capabilities={'chromeOptions':{'windowTypes':['webview']}})

driver.get('chrome://apps')

wait_for_new_window_to_appear()

driver.switch_to.window(driver.window_handles[1])

self.driver.find_element_by_id('Email').send_keys('someone@gmail.com')

driver.find_element_by_id('Passwd').send_keys(getpass.getpass())

driver.find_element_by_id('signIn').click()

Ref­er­ences :

  • https://bugs.chromium.org/p/chromedriver/issues/detail?id=960

  • http://stackoverflow.com/questions/21022837/how-to-automate-testing-of-chrome-packaged-apps


You may also like...