com.appfoundation.automation.util
Class ExtJs5XPathUtils

java.lang.Object
  extended by com.appfoundation.automation.util.ExtJs5XPathUtils

public class ExtJs5XPathUtils
extends java.lang.Object


Field Summary
private static org.apache.log4j.Logger log
           
 
Constructor Summary
ExtJs5XPathUtils()
           
 
Method Summary
static java.lang.String findActionIconByTooltipInRowInGridByHeaderText(java.lang.String tooltip, int row, java.lang.String headerText)
          XPath for getting an action icon by its tooltip text, in the specified 1-based row, in the grid with a header containing the given text
static java.lang.String findBody()
          Returns the XPAth for getting the page body
static java.lang.String findBodyCellInDynamicGrid(int position, int group, int occurrence)
          XPath gor getting a body cell by its position (row) in the group of a dynamic grid
static java.lang.String findButtonByPositionInPagingToolbarInGridByHeaderText(int position, java.lang.String headerText)
          XPath for the Button by position in the Paging Toolbar In the grid by header text
static java.lang.String findButtonByText(java.lang.String text)
          XPath for getting the button by its text
static java.lang.String findButtonByTextAndOccurrence(java.lang.String text, int occurrence)
          XPath for getting a button by its text and then by its occurrence.
static java.lang.String findButtonByTextInMonthPickerByOccurrence(java.lang.String text, int occurrence)
          XPath for getting the button by its text in the month picker by its occurrence in the page
static java.lang.String findButtonByTextInToolbarInGridByHeaderText(java.lang.String buttonText, java.lang.String headerText)
          XPath for getting the button by its text in the toolbar of the grid with the given text
static java.lang.String findButtonMenu()
          XPath for getting visible button menu in the current page
static java.lang.String findCellByRowAndColumnInGridByHeaderText(int row, int column, java.lang.String headerText)
          XPath for getting a cell by its row and column position with the grid with a header containing the given text
static java.lang.String findCheckboxByFormLabel(java.lang.String label)
          XPath for getting the checkbox with the specific label within a form
static java.lang.String findComboBoxButtonByFormLabel(java.lang.String label)
          XPath for getting a combo box button by its form label
static java.lang.String findComboBoxButtonByOccurrence(int occurrence)
          XPath for getting a combo box button by its occurrence in the page
static java.lang.String findComboBoxByFormLabel(java.lang.String label)
          XPath for getting a combo box by its form label
static java.lang.String findComboBoxByOccurrence(int occurrence)
          XPath for getting a combo box by its occurrence in the page
static java.lang.String findComboBoxItemByRow(int row)
          XPath for getting a combo box item by its row position in the combo box popup
static java.lang.String findComboBoxPopup()
          XPath for getting the visible combo box popup within the page
static java.lang.String findDataViewItemByOccurrence(int occurrence)
          XPath for getting the Data View item by its occurrence in the page.
static java.lang.String findDatePickerByOccurrence(int occurrence)
          XPath for getting a date picker by its occurrence in the page
static java.lang.String findDayButtonByTextInDatePickerByOccurrence(java.lang.String text, int occurrence)
          XPath for getting the day button of the given text (like 27) in the date picker by its occurrence in the page
static java.lang.String findExpanderByRowInGridByHeaderText(int row, java.lang.String headerText)
          XPath for getting the expand/collapse widget in the specific row in the grid with the specific header text
static java.lang.String findExpanderInRowInGridByHeaderText(int row, java.lang.String headerText)
          Xpath for getting the expander icon in the given row in the grid with the given header text
static java.lang.String findFileFieldByButtonText(java.lang.String text)
          XPath for getting a file field associated with the button of the given text
static java.lang.String findGroupHeaderInDynamicGrid(java.lang.String text, int occurrence)
          XPath for getting a group header in a dynamic grid
static java.lang.String findGroupInDynamicGrid(int group, int occurrence)
          XPath for getting an entire group in a dynamic grid by occurrence
static java.lang.String findHeaderCellByPositionInGridByHeaderText(int position, java.lang.String headerText)
          XPath for getting the header cell by its 1-based position within a grid with a header containing the given text
static java.lang.String findHeaderCellInDynamicGrid(int position, int group, int occurrence)
          XPath for getting a header cell by its position in a group in a dyanmic grid
static java.lang.String findInputByFormLabel(java.lang.String label)
          XPath for getting an input by its form label
static java.lang.String findInputByName(java.lang.String name)
          XPath for getting an input by its name
static java.lang.String findInputByPositionInMessageBox(int position)
          XPath for the input by its position in the message box
static java.lang.String findInputInMultiSelectorDialog()
          XPath for getting the input field the multi selector dialog
static java.lang.String findInputInRowInGridByHeaderText(int row, java.lang.String headerText)
          Xpath for getting the input field in the given row in the grid with the given header text
static java.lang.String findLabelByText(java.lang.String text)
          XPath for getting a label that contains the given text
static java.lang.String findLinkByText(java.lang.String text)
          XPath for getting a link by its text content
static java.lang.String findMessageBox()
          XPath for getting a message box (alert dialog), assuming it is the only one in the page.
static java.lang.String findMessageBoxBody()
          XPath for getting a message box's body
static java.lang.String findMessageBoxButtonByText(java.lang.String text)
          XPath for the message box button by its text
static java.lang.String findMessageBoxHeader()
          XPath for getting a message box's header
static java.lang.String findMonthButtonInDatePickerByOccurrence(int occurrence)
          XPath for getting the month button in the date picker by its occurrence in the page
static java.lang.String findMonthOrYearButtonByTextInMonthPickerByOccurrence(java.lang.String text, int occurrence)
          XPath for getting the month of year button by its text in the month picker by its occurrence in the page
static java.lang.String findMonthPickerByOccurrence(int occurrence)
          XPath for getting the month picker by its occurrence in the page
static java.lang.String findMultiSelectorDialog()
          XPath for getting the multi selector dialog
static java.lang.String findNextButtonInDatePickerByOccurrence(int occurrence)
          XPath for getting the next month button in the date picker by its occurrence in the page
static java.lang.String findOptionByTextInButtonMenu(java.lang.String text)
          XPath for getting the option by the given text in the current visible button menu
static java.lang.String findPagingToolbarInGridByHeaderText(java.lang.String headerText)
          XPath for getting the paging toolbar in the grid with the given header text
static java.lang.String findPanelBodyByHeaderText(java.lang.String headerText)
          XPath for getting the panel body of a panel with the header containing the given text
static java.lang.String findPrevButtonInDatePickerByOccurrence(int occurrence)
          XPath for getting the previous month button in the date picker by its occurrence in the page
static java.lang.String findRadioByLabel(java.lang.String label)
          XPath for getting a radio button by its label
static java.lang.String findReponsiveMenuButton()
          XPath for getting the responsive menu button when present
static java.lang.String findResponsiveMenuItemByText(java.lang.String text)
          XPath for getting a responsive menu item by its text
static java.lang.String findRowBodyByRowPositionInGridByHeaderText(int row, java.lang.String headerText)
          XPath for getting the row body (post row expansion) by the row position in the grid with the header of the given text
static java.lang.String findRowByPositionInGridByHeaderText(int position, java.lang.String headerText)
          XPath for getting an entire row by its 1-based position within a grid with a header containing the given text
static java.lang.String findRowByPositionInMultiSelectorDialog(int row)
          XPath for getting a row by position in the current multi selector dialog
static java.lang.String findRowByTextInGridByHeaderText(java.lang.String rowText, java.lang.String headerText)
          XPath for getting a row by its text in the grid with the given header text
static java.lang.String findRowsInGridByHeaderText(java.lang.String headerText)
          XPath for getting all of the rows in the grid with the given header text
static java.lang.String findSliderThumbByFormLabel(java.lang.String label)
          XPath for getting the slider thumb by its form label
static java.lang.String findSliderThumbByOccurrence(int occurrence)
          XPath for getting the slider thumb by its occurrence in the page
static java.lang.String findSliderThumbInPagingToolbarInGridByHeaderText(java.lang.String headerText)
          XPath for getting the slider thumb in the paging toolbar of the grid with the given header text
static java.lang.String findTextAreaByFormLabel(java.lang.String label)
          XPath for getting a text area by its form label
static java.lang.String findTextAreaByName(java.lang.String name)
          XPath for getting a text area by its name
static java.lang.String findTextAreaByPositionInMessageBox(int position)
          XPath for the text area by its position in the message box
static java.lang.String findToast()
          XPath for getting the toast component, assuming there is only one in the screen
static java.lang.String findToolbarInGridByHeaderText(java.lang.String headerText)
          XPath for getting the toolbar in the grid by header text
static java.lang.String findToolByPositionInHeaderByText(int position, java.lang.String headerText)
          XPath for getting the tool in the panel header by its 1-based position
static java.lang.String findToolTipByText(java.lang.String text)
          XPath for getting a tooltip by its text
static java.lang.String findToolTipInRowByPositionInGridByHeaderText(java.lang.String tooltip, int row, java.lang.String headerText)
          XPath for getting a tooltip in the row by position in the grid by header text
private static java.lang.String rootButtonByText(java.lang.String text)
           
private static java.lang.String rootCheckbox()
           
private static java.lang.String rootComboBox()
           
private static java.lang.String rootRadio()
           
private static java.lang.String rootSliderThumb()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log
Constructor Detail

ExtJs5XPathUtils

public ExtJs5XPathUtils()
Method Detail

rootButtonByText

private static java.lang.String rootButtonByText(java.lang.String text)

rootCheckbox

private static java.lang.String rootCheckbox()

rootComboBox

private static java.lang.String rootComboBox()

rootRadio

private static java.lang.String rootRadio()

rootSliderThumb

private static java.lang.String rootSliderThumb()

findToolByPositionInHeaderByText

public static java.lang.String findToolByPositionInHeaderByText(int position,
                                                                java.lang.String headerText)
XPath for getting the tool in the panel header by its 1-based position

Parameters:
position -
headerText -
Returns:

findPanelBodyByHeaderText

public static java.lang.String findPanelBodyByHeaderText(java.lang.String headerText)
XPath for getting the panel body of a panel with the header containing the given text

Parameters:
headerText -
Returns:

findHeaderCellByPositionInGridByHeaderText

public static java.lang.String findHeaderCellByPositionInGridByHeaderText(int position,
                                                                          java.lang.String headerText)
XPath for getting the header cell by its 1-based position within a grid with a header containing the given text

Parameters:
position -
headerText -
Returns:

findRowByPositionInGridByHeaderText

public static java.lang.String findRowByPositionInGridByHeaderText(int position,
                                                                   java.lang.String headerText)
XPath for getting an entire row by its 1-based position within a grid with a header containing the given text

Parameters:
position -
headerText -
Returns:

findCellByRowAndColumnInGridByHeaderText

public static java.lang.String findCellByRowAndColumnInGridByHeaderText(int row,
                                                                        int column,
                                                                        java.lang.String headerText)
XPath for getting a cell by its row and column position with the grid with a header containing the given text

Parameters:
row -
column -
headerText -
Returns:

findActionIconByTooltipInRowInGridByHeaderText

public static java.lang.String findActionIconByTooltipInRowInGridByHeaderText(java.lang.String tooltip,
                                                                              int row,
                                                                              java.lang.String headerText)
XPath for getting an action icon by its tooltip text, in the specified 1-based row, in the grid with a header containing the given text

Parameters:
tooltip -
row -
headerText -
Returns:

findRowsInGridByHeaderText

public static java.lang.String findRowsInGridByHeaderText(java.lang.String headerText)
XPath for getting all of the rows in the grid with the given header text

Parameters:
headerText -
Returns:

findMessageBox

public static java.lang.String findMessageBox()
XPath for getting a message box (alert dialog), assuming it is the only one in the page.

Returns:

findMessageBoxHeader

public static java.lang.String findMessageBoxHeader()
XPath for getting a message box's header

Returns:

findMessageBoxBody

public static java.lang.String findMessageBoxBody()
XPath for getting a message box's body

Returns:

findMessageBoxButtonByText

public static java.lang.String findMessageBoxButtonByText(java.lang.String text)
XPath for the message box button by its text

Parameters:
text -
Returns:

findPagingToolbarInGridByHeaderText

public static java.lang.String findPagingToolbarInGridByHeaderText(java.lang.String headerText)
XPath for getting the paging toolbar in the grid with the given header text

Parameters:
headerText -
Returns:

findButtonByPositionInPagingToolbarInGridByHeaderText

public static java.lang.String findButtonByPositionInPagingToolbarInGridByHeaderText(int position,
                                                                                     java.lang.String headerText)
XPath for the Button by position in the Paging Toolbar In the grid by header text

Parameters:
position -
headerText -
Returns:

findSliderThumbInPagingToolbarInGridByHeaderText

public static java.lang.String findSliderThumbInPagingToolbarInGridByHeaderText(java.lang.String headerText)
XPath for getting the slider thumb in the paging toolbar of the grid with the given header text

Parameters:
headerText -
Returns:

findExpanderByRowInGridByHeaderText

public static java.lang.String findExpanderByRowInGridByHeaderText(int row,
                                                                   java.lang.String headerText)
XPath for getting the expand/collapse widget in the specific row in the grid with the specific header text

Parameters:
row -
headerText -
Returns:

findRowBodyByRowPositionInGridByHeaderText

public static java.lang.String findRowBodyByRowPositionInGridByHeaderText(int row,
                                                                          java.lang.String headerText)
XPath for getting the row body (post row expansion) by the row position in the grid with the header of the given text

Parameters:
row -
headerText -
Returns:

findToolbarInGridByHeaderText

public static java.lang.String findToolbarInGridByHeaderText(java.lang.String headerText)
XPath for getting the toolbar in the grid by header text

Parameters:
headerText -
Returns:

findButtonByTextInToolbarInGridByHeaderText

public static java.lang.String findButtonByTextInToolbarInGridByHeaderText(java.lang.String buttonText,
                                                                           java.lang.String headerText)
XPath for getting the button by its text in the toolbar of the grid with the given text

Parameters:
buttonText -
headerText -
Returns:

findButtonByText

public static java.lang.String findButtonByText(java.lang.String text)
XPath for getting the button by its text

Parameters:
text -
Returns:

findButtonByTextAndOccurrence

public static java.lang.String findButtonByTextAndOccurrence(java.lang.String text,
                                                             int occurrence)
XPath for getting a button by its text and then by its occurrence. This is for when you have several buttons with the same text on the same page.

Parameters:
text -
occurrence -
Returns:

findToast

public static java.lang.String findToast()
XPath for getting the toast component, assuming there is only one in the screen

Returns:

findInputByPositionInMessageBox

public static java.lang.String findInputByPositionInMessageBox(int position)
XPath for the input by its position in the message box

Parameters:
position -
Returns:

findTextAreaByPositionInMessageBox

public static java.lang.String findTextAreaByPositionInMessageBox(int position)
XPath for the text area by its position in the message box

Parameters:
position -
Returns:

findCheckboxByFormLabel

public static java.lang.String findCheckboxByFormLabel(java.lang.String label)
XPath for getting the checkbox with the specific label within a form

Parameters:
label -
Returns:

findComboBoxByOccurrence

public static java.lang.String findComboBoxByOccurrence(int occurrence)
XPath for getting a combo box by its occurrence in the page

Parameters:
occurrence -
Returns:

findComboBoxByFormLabel

public static java.lang.String findComboBoxByFormLabel(java.lang.String label)
XPath for getting a combo box by its form label

Parameters:
label -
Returns:

findComboBoxButtonByFormLabel

public static java.lang.String findComboBoxButtonByFormLabel(java.lang.String label)
XPath for getting a combo box button by its form label

Parameters:
label -
Returns:

findComboBoxButtonByOccurrence

public static java.lang.String findComboBoxButtonByOccurrence(int occurrence)
XPath for getting a combo box button by its occurrence in the page

Parameters:
occurrence -
Returns:

findComboBoxPopup

public static java.lang.String findComboBoxPopup()
XPath for getting the visible combo box popup within the page

Returns:

findComboBoxItemByRow

public static java.lang.String findComboBoxItemByRow(int row)
XPath for getting a combo box item by its row position in the combo box popup

Parameters:
row -
Returns:

findInputByName

public static java.lang.String findInputByName(java.lang.String name)
XPath for getting an input by its name

Parameters:
name -
Returns:

findInputByFormLabel

public static java.lang.String findInputByFormLabel(java.lang.String label)
XPath for getting an input by its form label

Parameters:
label -
Returns:

findTextAreaByFormLabel

public static java.lang.String findTextAreaByFormLabel(java.lang.String label)
XPath for getting a text area by its form label

Parameters:
label -
Returns:

findTextAreaByName

public static java.lang.String findTextAreaByName(java.lang.String name)
XPath for getting a text area by its name

Parameters:
name -
Returns:

findFileFieldByButtonText

public static java.lang.String findFileFieldByButtonText(java.lang.String text)
XPath for getting a file field associated with the button of the given text

Parameters:
text -
Returns:

findRadioByLabel

public static java.lang.String findRadioByLabel(java.lang.String label)
XPath for getting a radio button by its label

Parameters:
label -
Returns:

findDatePickerByOccurrence

public static java.lang.String findDatePickerByOccurrence(int occurrence)
XPath for getting a date picker by its occurrence in the page

Parameters:
occurrence -
Returns:

findPrevButtonInDatePickerByOccurrence

public static java.lang.String findPrevButtonInDatePickerByOccurrence(int occurrence)
XPath for getting the previous month button in the date picker by its occurrence in the page

Parameters:
occurrence -
Returns:

findNextButtonInDatePickerByOccurrence

public static java.lang.String findNextButtonInDatePickerByOccurrence(int occurrence)
XPath for getting the next month button in the date picker by its occurrence in the page

Parameters:
occurrence -
Returns:

findMonthButtonInDatePickerByOccurrence

public static java.lang.String findMonthButtonInDatePickerByOccurrence(int occurrence)
XPath for getting the month button in the date picker by its occurrence in the page

Parameters:
occurrence -
Returns:

findDayButtonByTextInDatePickerByOccurrence

public static java.lang.String findDayButtonByTextInDatePickerByOccurrence(java.lang.String text,
                                                                           int occurrence)
XPath for getting the day button of the given text (like 27) in the date picker by its occurrence in the page

Parameters:
text -
occurrence -
Returns:

findMonthPickerByOccurrence

public static java.lang.String findMonthPickerByOccurrence(int occurrence)
XPath for getting the month picker by its occurrence in the page

Parameters:
occurrence -
Returns:

findMonthOrYearButtonByTextInMonthPickerByOccurrence

public static java.lang.String findMonthOrYearButtonByTextInMonthPickerByOccurrence(java.lang.String text,
                                                                                    int occurrence)
XPath for getting the month of year button by its text in the month picker by its occurrence in the page

Parameters:
text -
occurrence -
Returns:

findButtonByTextInMonthPickerByOccurrence

public static java.lang.String findButtonByTextInMonthPickerByOccurrence(java.lang.String text,
                                                                         int occurrence)
XPath for getting the button by its text in the month picker by its occurrence in the page

Parameters:
text -
occurrence -
Returns:

findButtonMenu

public static java.lang.String findButtonMenu()
XPath for getting visible button menu in the current page

Returns:

findOptionByTextInButtonMenu

public static java.lang.String findOptionByTextInButtonMenu(java.lang.String text)
XPath for getting the option by the given text in the current visible button menu

Parameters:
text -
Returns:

findSliderThumbByOccurrence

public static java.lang.String findSliderThumbByOccurrence(int occurrence)
XPath for getting the slider thumb by its occurrence in the page

Parameters:
occurrence -
Returns:

findSliderThumbByFormLabel

public static java.lang.String findSliderThumbByFormLabel(java.lang.String label)
XPath for getting the slider thumb by its form label

Parameters:
label -
Returns:

findLabelByText

public static java.lang.String findLabelByText(java.lang.String text)
XPath for getting a label that contains the given text

Parameters:
text -
Returns:

findMultiSelectorDialog

public static java.lang.String findMultiSelectorDialog()
XPath for getting the multi selector dialog

Returns:

findInputInMultiSelectorDialog

public static java.lang.String findInputInMultiSelectorDialog()
XPath for getting the input field the multi selector dialog

Returns:

findRowByPositionInMultiSelectorDialog

public static java.lang.String findRowByPositionInMultiSelectorDialog(int row)
XPath for getting a row by position in the current multi selector dialog

Parameters:
row -
Returns:

findToolTipByText

public static java.lang.String findToolTipByText(java.lang.String text)
XPath for getting a tooltip by its text

Parameters:
text -
Returns:

findToolTipInRowByPositionInGridByHeaderText

public static java.lang.String findToolTipInRowByPositionInGridByHeaderText(java.lang.String tooltip,
                                                                            int row,
                                                                            java.lang.String headerText)
XPath for getting a tooltip in the row by position in the grid by header text

Parameters:
tooltip -
row -
headerText -
Returns:

findLinkByText

public static java.lang.String findLinkByText(java.lang.String text)
XPath for getting a link by its text content

Parameters:
text -
Returns:

findBody

public static java.lang.String findBody()
Returns the XPAth for getting the page body

Returns:

findReponsiveMenuButton

public static java.lang.String findReponsiveMenuButton()
XPath for getting the responsive menu button when present

Returns:

findResponsiveMenuItemByText

public static java.lang.String findResponsiveMenuItemByText(java.lang.String text)
XPath for getting a responsive menu item by its text

Parameters:
text -
Returns:

findGroupInDynamicGrid

public static java.lang.String findGroupInDynamicGrid(int group,
                                                      int occurrence)
XPath for getting an entire group in a dynamic grid by occurrence

Parameters:
column -
occurrence -
Returns:

findHeaderCellInDynamicGrid

public static java.lang.String findHeaderCellInDynamicGrid(int position,
                                                           int group,
                                                           int occurrence)
XPath for getting a header cell by its position in a group in a dyanmic grid

Parameters:
position -
group -
occurrence -
Returns:

findBodyCellInDynamicGrid

public static java.lang.String findBodyCellInDynamicGrid(int position,
                                                         int group,
                                                         int occurrence)
XPath gor getting a body cell by its position (row) in the group of a dynamic grid

Parameters:
position -
group -
occurrence -
Returns:

findGroupHeaderInDynamicGrid

public static java.lang.String findGroupHeaderInDynamicGrid(java.lang.String text,
                                                            int occurrence)
XPath for getting a group header in a dynamic grid

Parameters:
text -
occurrence -
Returns:

findDataViewItemByOccurrence

public static java.lang.String findDataViewItemByOccurrence(int occurrence)
XPath for getting the Data View item by its occurrence in the page. Note that items flow in a multi sort grid from left to right and then top to bottom.

Parameters:
occurrence -
Returns:

findRowByTextInGridByHeaderText

public static java.lang.String findRowByTextInGridByHeaderText(java.lang.String rowText,
                                                               java.lang.String headerText)
XPath for getting a row by its text in the grid with the given header text

Parameters:
rowText -
headerText -
Returns:

findExpanderInRowInGridByHeaderText

public static java.lang.String findExpanderInRowInGridByHeaderText(int row,
                                                                   java.lang.String headerText)
Xpath for getting the expander icon in the given row in the grid with the given header text

Parameters:
row -
headerText -
Returns:

findInputInRowInGridByHeaderText

public static java.lang.String findInputInRowInGridByHeaderText(int row,
                                                                java.lang.String headerText)
Xpath for getting the input field in the given row in the grid with the given header text

Parameters:
row -
headerText -
Returns: