예제 #1
0
 @Test(dataProvider = "testConstructorPathDataProvider")
 public void getPathSelectorCorrectlyFromConstructors(
     LiveGridPanel liveGridPanel, String expectedXpath) {
   Assert.assertEquals(liveGridPanel.getXPath(), expectedXpath);
 }
예제 #2
0
 @DataProvider
 public static Object[][] testConstructorPathDataProvider1() {
   return new Object[][] {
     {
       grid.getGridRow(),
       grid.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridCls.getGridRow(),
       gridCls.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainer.getGridRow(),
       gridContainer.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridClsAndColumn.getGridRow(),
       gridClsAndColumn.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainerAndColumn.getGridRow(),
       gridContainerAndColumn.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainerAndClsAndColumn.getGridRow(),
       gridContainerAndClsAndColumn.getXPath()
           + "//div[contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       grid.getRowLocator(1),
       LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridCls.getRowLocator(1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainer.getRowLocator(1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridClsAndColumn.getRowLocator(1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainerAndColumn.getRowLocator(1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
     {
       gridContainerAndClsAndColumn.getRowLocator(1),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]"
     },
   };
 }
예제 #3
0
 @DataProvider
 public static Object[][] testConstructorPathDataProvider2() {
   return new Object[][] {
     {
       grid.getGridCell(1),
       LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       gridCls.getGridCell(1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       gridContainer.getGridCell(1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       gridClsAndColumn.getGridCell(1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       gridContainerAndColumn.getGridCell(1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       gridContainerAndClsAndColumn.getGridCell(1),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ')]"
     },
     {
       grid.getCell(1, 1),
       LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       gridCls.getCell(1, 1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       gridContainer.getCell(1, 1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       gridClsAndColumn.getCell(1, 1),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       gridContainerAndColumn.getCell(1, 1),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       gridContainerAndClsAndColumn.getCell(1, 1),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(@class, 'x-grid3-cell-inner')]"
     },
     {
       grid.getCell("search", SearchType.EQUALS),
       LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[text()='search']"
     },
     {
       gridCls.getCell("search", SearchType.EQUALS),
       LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[text()='search']"
     },
     {
       gridContainer.getCell("search", SearchType.EQUALS),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[text()='search']"
     },
     {
       gridClsAndColumn.getCell("search", SearchType.EQUALS),
       LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[text()='search']"
     },
     {
       gridContainerAndColumn.getCell("search", SearchType.EQUALS),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[text()='search']"
     },
     {
       gridContainerAndClsAndColumn.getCell("search", SearchType.EQUALS),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[text()='search']"
     },
     {
       grid.getCell("search", SearchType.STARTS_WITH),
       LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[starts-with(text(),'search')]"
     },
     {
       gridCls.getCell("search", SearchType.STARTS_WITH),
       LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[starts-with(text(),'search')]"
     },
     {
       gridContainer.getCell("search", SearchType.STARTS_WITH),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-0 ')]//*[starts-with(text(),'search')]"
     },
     {
       gridClsAndColumn.getCell("search", SearchType.STARTS_WITH),
       LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[starts-with(text(),'search')]"
     },
     {
       gridContainerAndColumn.getCell("search", SearchType.STARTS_WITH),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[starts-with(text(),'search')]"
     },
     {
       gridContainerAndClsAndColumn.getCell("search", SearchType.STARTS_WITH),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//*[contains(concat(' ', @class, ' '), ' x-grid3-td-1 ')]//*[starts-with(text(),'search')]"
     },
     {
       grid.getGridCell(1, 1, "text"),
       LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
     {
       gridCls.getGridCell(1, 1, "text"),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
     {
       gridContainer.getGridCell(1, 1, "text"),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
     {
       gridClsAndColumn.getGridCell(1, 1, "text"),
       LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
     {
       gridContainerAndColumn.getGridCell(1, 1, "text"),
       CONTAINER_PATH
           + LIVE_GRID_PATH
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
     {
       gridContainerAndClsAndColumn.getGridCell(1, 1, "text"),
       CONTAINER_PATH
           + LIVE_GRID_PANEL_CLS
           + "//div[1][contains(concat(' ', @class, ' '), ' x-grid3-row ') and not(contains(@class, 'x-grid3-row-checker'))]//td[1]//*[contains(concat(' ', @class, ' '), ' x-grid3-cell-inner ') and contains(text(),'text')]"
     },
   };
 }