Created
November 2, 2012 08:12
-
-
Save yurenju/3999426 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gaiatest import GaiaTestCase | |
| import time | |
| import unittest | |
| class TestInstallApps(GaiaTestCase): | |
| manifests = ['http://pasjans-online.pl/manifest.webapp', | |
| 'http://moz.galactians.spacemonsters.co.uk/manifest.webapp', | |
| 'http://app-6-mwa-vc-as-en.jocly.com/jocly.webapp', | |
| 'http://littlealchemy.com/manifest.webapp', | |
| 'http://moz.galactians2.spacemonsters.co.uk/manifest.webapp', | |
| 'http://entanglement.gopherwoodstudios.com/this.webapp?cachebreaker', | |
| 'http://moztw.org/foxmosa/game/pairs/manifest.webapp', | |
| 'http://app-16-mwa-vc-as-en.jocly.com/jocly.webapp', | |
| 'http://gopherwoodstudios.com/sandtrap/marketplace.webapp', | |
| 'http://moz.rebelrescue.spacemonsters.co.uk/manifest.webapp', | |
| 'http://trolololo.andrebaptista.net/manifest.webapp', | |
| 'http://app-7-mwa-vc-as-en.jocly.com/jocly.webapp', | |
| 'http://moz.dungeonadventure.spacemonsters.co.uk/manifest.webapp', | |
| 'http://www.pathuku.com/manifest.webapp', | |
| 'http://app-13-mwa-vc-as-en.jocly.com/jocly.webapp'] | |
| _yes_button_locator = ('id', 'permission-yes') | |
| def setUp(self): | |
| GaiaTestCase.setUp(self) | |
| # unlock the lockscreen if it's locked | |
| self.assertTrue(self.lockscreen.unlock()) | |
| self.app = self.apps.launch('Homescreen') | |
| def test_install_apps(self): | |
| for manifest in self.manifests: | |
| print "installing %s" % manifest | |
| self.marionette.switch_to_frame(self.app.frame_id) | |
| self.marionette.execute_script( | |
| 'navigator.mozApps.install("%s")' % manifest) | |
| self.marionette.switch_to_frame() | |
| self.wait_for_element_displayed(*self._yes_button_locator) | |
| yes = self.marionette.find_element(*self._yes_button_locator) | |
| yes.click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment