示例#1
0
def step_impl(context, popupwin, entry, win):
    click_those = l.getobjectlist(win)
    for thing in click_those:
        l.mouserightclick(win, thing)
        if l.waittillguiexist(popupwin, entry, 1): return
        l.generatekeyevent("<esc>") #close possible menus
        time.sleep(0.5)
    #not found
    assert(False)
示例#2
0
	def context_click(self,msg, window_name, file_or_dir_name):
		'''
		context Clicks on a File Or Directory in the Window
		'''
		logger.debug(msg)
		try :
			ldtp.rightclick(window_name,file_or_dir_name)
		except :
			ldtp.mouserightclick(window_name,file_or_dir_name)
示例#3
0
	def select_context_click_menu(self,window_name,object_name = None,menu = None):
		if self.os_family == 'windows':
			# object_name = "lst"+object_name
			pane_name = self.get_explorer_main_pane()	
			# self.click_element("Clicking pane", window_name, pane_name)	
			if object_name:
				time.sleep(4)
				ldtp.mouserightclick(window_name,object_name)
			else:
				try:
					ldtp.mouserightclick(window_name,'lblThisfolderisempty')
				except:
					pass
				ldtp.mouserightclick(window_name,pane_name)
			ldtp.selectmenuitem('mnuContext','mnu%s'% menu)
示例#4
0
    def mouse_right_click(self, window_name, object_name):
        """
        Mouse right click on an object.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.

        @type window_name: string

        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob. Or menu heirarchy

        @type object_name: string

        @return: 1 on success.

        @rtype: integer
        """
        try:
            self._info("Mouse right click on an object")
            return ldtp.mouserightclick(window_name, object_name)
        except LdtpExecutionError as e:
            raise LdtpExecutionError(e.message)