Esempio n. 1
0
 def get_facts_value_by_name(self, facts_name):
     if RHSMGuiLocator().get_os_serials() == "6":
         for row in range(ldtp.getrowcount(RHSMGuiLocator().get_locator("system-facts-dialog"), RHSMGuiLocator().get_locator("facts-view-table"))):
             if(ldtp.getcellvalue(RHSMGuiLocator().get_locator("system-facts-dialog"), RHSMGuiLocator().get_locator("facts-view-table"), row, 0).strip() == facts_name):
                 logger.info("get_facts_value_by_name")
                 return ldtp.getcellvalue(RHSMGuiLocator().get_locator("system-facts-dialog"), RHSMGuiLocator().get_locator("facts-view-table"), row, 1)
         raise FailException("Test Failed - Failed to get_facts_value_by_name.")
Esempio n. 2
0
    def get_cell_value(self, window_name, object_name, row_index, column=0):
        """
        Get cell value

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param row_index: Row index to get
        @type row_index: integer
        @param column: Column index to get, default value 0
        @type column: integer

        @return: cell value on success.
        @rtype: string
        """
        try:
            self._info("get cell value (%s, %s, %d)" %
                       (window_name, object_name, row_index))
            return ldtp.getcellvalue(window_name, object_name, row_index,
                                     column)
        except LdtpExecutionError as e:
            raise LdtpExecutionError(str(e))
Esempio n. 3
0
 def _quickgettablerowindex(self, window, table, target):
   numrows = ldtp.getrowcount(window, table)
   for i in range(0,numrows):
     try:
       value = ldtp.getcellvalue(window, table, i, 0)
       if self._matches(target,value):
         ldtp.selectrowindex(window, table, i)
         return i
     except:
       continue
   raise Exception("Item not found in table!")
Esempio n. 4
0
 def _gettablerowindex(self, window, table, target):
   numrows = ldtp.getrowcount(window, table)
   numcols = len(ldtp.getobjectproperty(window, table, 'children').split())
   for i in range(0,numrows):
     for j in range(0,numcols):
       try:
         value = ldtp.getcellvalue(window, table, i, j)
         if self._matches(target,value):
           ldtp.selectrowindex(window, table, i)
           return i
       except:
         continue
   raise Exception("Item not found in table!")
Esempio n. 5
0
    def get_cell_value(self, window_name, object_name, row_index, column=0):
        """
        Get cell value

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param row_index: Row index to get
        @type row_index: integer
        @param column: Column index to get, default value 0
        @type column: integer

        @return: cell value on success.
        @rtype: string
        """
        try:
            self._info("get cell value (%s, %s, %d)" % (window_name, object_name, row_index))
            return ldtp.getcellvalue(window_name, object_name, row_index, column)
        except LdtpExecutionError as e:
            raise LdtpExecutionError(str(e))
Esempio n. 6
0
 def get_table_cell(self, window, table_name, row, colomn):
     return ldtp.getcellvalue(RHSMGuiLocator().get_locator(window), RHSMGuiLocator().get_locator(table_name), row, colomn)