storeTableContent

description

Allows to search the content within a table. This is a very useful functionality for scenario like:

Assume a table of users with an 'Edit' link in front of each name. We want to search through the name list and want to click the corresponding 'Edit' link in front of the name.

storeGlobalTable* also can be enabled if you install global extension.

example of use

example of use:

storeTableContent user/0/1/userId=(\w+)/1 varUserId
storeTableRow user/0/3 varRowNo

notes

Selenium accepts only two parameters first as input and second as output variable. But in this function we need to pass 5 parameters to the function. Simple work-arround I did is simply to separate parameters by forward-slash ("/"). This works fine for many general senarios (Thanks to the power of regular expressions). But there will issues need to pay speciall attention if you use complex 'searchText' and complex 'contentPattern's.

  • storeTableContent
    • Five parameters: searchText/searchCol/contentCol/contentPat/contentPos
      • searchText: Text you are looking in the Table
      • searchcol: Searching column number (start count from 0)
      • contentCol: Column number of the content
      • contentPat: Pattern used to grab only the required portion of the column content. (.* - catch all the content)
      • contentPos: The matching group to return (0 - for complete match)
  • storeTableRow
    • Three parameters: searchText/searchCol/minCol
      • searchText: Text you are looking in the Table
      • searchcol: Searching column number (start count from 0)
      • minCol: (Optional) Tables having columns less than minCol with ignore

File: 

Type: 

User-Extension