@@ -18,17 +18,22 @@
20from unity8.shell.emulators import UnityEmulatorBase
20from unity8.shell.emulators import UnityEmulatorBase
21−
21+from time import sleep
23class Dash(UnityEmulatorBase):
23class Dash(UnityEmulatorBase):
25 """An emulator that understands the Dash."""
25 """An emulator that understands the Dash."""
27 def get_home_applications_grid(self):
27 def get_home_applications_grid(self):
28+ for i in range(1,10):
28− return self.get_scope('home').select_single(
29+ get_grid = self.get_scope('home').select_single(
29− "GenericFilterGrid",
30+ "GenericFilterGrid",
30− objectName="applications.scope"
31+ objectName="applications.scope"
33 def get_application_icon(self, text):
38 def get_application_icon(self, text):
34 """Returns a 'Tile' icon that has the text 'text' from the application
39 """Returns a 'Tile' icon that has the text 'text' from the application
@@ -40,7 +45,11 @@ class Dash(UnityEmulatorBase):
42 app_grid = self.get_home_applications_grid()
47 app_grid = self.get_home_applications_grid()
48+ for i in range(1,10):
43− resp_grid = app_grid.select_single('ResponsiveGridView')
49+ resp_grid = app_grid.select_single('ResponsiveGridView')
50+ if resp_grid != None:
44 return resp_grid.select_single('Tile', text=text)
53 return resp_grid.select_single('Tile', text=text)
46 def get_scope(self, scope_name='home'):
55 def get_scope(self, scope_name='home'):