~popey/ubuntu-rssreader-app/new-icon

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_rssreader_app/emulators.py

  • Committer: Tarmac
  • Author(s): nskaggs
  • Date: 2014-01-15 17:09:25 UTC
  • mfrom: (160.1.3 ubuntu-rssreader-app)
  • Revision ID: tarmac-20140115170925-1scrusfetilsosg9
Remove hardcoded names
Add timing asserts.

Approved by Alan Pope ㋛, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
            return
57
57
        return activity
58
58
 
 
59
    def strip_html_tags(self, text):
 
60
        finished = 0
 
61
        while not finished:
 
62
            finished = 1
 
63
            start = text.find("<")
 
64
            if start >= 0:
 
65
                stop = text[start:].find(">")
 
66
                if stop >= 0:
 
67
                    text = text[:start] + text[start+stop+1:]
 
68
                    finished = 0
 
69
        return text
 
70
 
59
71
    #### choose topics page objects
60
72
    def get_choose_topics_items(self):
61
73
        return self.select_many("Standard", objectName="topicItem")
71
83
        #grab just the first checkbox
72
84
        return self.select_many_retry("CheckBox", objectName="feedCheckbox")[0]
73
85
 
 
86
    def get_append_page_list_items(self):
 
87
        return self.select_many_retry("Standard",
 
88
                                      objectName="feedpagelistitem")
 
89
 
74
90
    def get_next_button(self):
75
91
        return self.select_single("Button", objectName="nextButton")
76
92