~om26er/address-book-app/test_collapse

« back to all changes in this revision

Viewing changes to tests/autopilot/address_book_app/emulators/main_window.py

  • Committer: Allan LeSage
  • Date: 2014-02-13 17:25:02 UTC
  • mfrom: (125.2.9 address-book-app)
  • Revision ID: allan.lesage@canonical.com-20140213172502-77wenj1et96kno72
Merged trunk, resolving conflicts (test passing).

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
            if p.pickMode:
31
31
                return p
32
32
        return None
 
33
 
 
34
    def get_contact_list_view(self):
 
35
        """
 
36
        Returns a ContactListView iobject for the current window
 
37
        """
 
38
        return self.wait_select_single( "ContactListView",
 
39
                                       objectName="contactListView")
 
40
 
 
41
    def get_button(self, name):
 
42
        """
 
43
        Returns a Button object matching 'name'
 
44
 
 
45
        Arguments:
 
46
            name: Name of the button
 
47
        """
 
48
        return self.wait_select_single( "Button", objectName=name)
 
49
 
 
50
    def cancel(self):
 
51
        """
 
52
        Press the 'Cancel' button
 
53
        """
 
54
        self.pointing_device.click_object(self.get_button("reject"))
 
55
 
 
56
    def save(self):
 
57
        """
 
58
        Press the 'Save' button
 
59
        """
 
60
        self.pointing_device.click_object(self.get_button("accept"))