~chris.gagnon/xpresser/xpresser-with-emulate-click-and-drag

« back to all changes in this revision

Viewing changes to xpresser/xp.py

  • Committer: Gustavo Niemeyer
  • Date: 2010-11-08 14:38:23 UTC
  • Revision ID: gustavo@niemeyer.net-20101108143823-t8ypia20sn68l28f
Added Xpresser.right_click() method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
            xp.click(x, y)
66
66
        """
67
67
        xutils.click(*self._compute_focus_point(args))
 
68
 
 
69
    def right_click(self, *args):
 
70
        """Right-click on the position specified by the provided arguments.
 
71
 
 
72
        The following examples show valid ways of specifying the position:
 
73
        
 
74
            xp.right_click("image-name")
 
75
            xp.right_click(image_match)
 
76
            xp.right_click(x, y)
 
77
        """
 
78
        xutils.right_click(*self._compute_focus_point(args))
68
79
            
69
80
    def hover(self, *args):
70
81
        """Hover over the position specified by the provided arguments.