Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Grid Class Reference
Inheritance diagram for Grid:
DataGrid Grid

Public Member Functions

 addProducts ()
 
- Public Member Functions inherited from DataGrid
 resetFilter ()
 
 search (array $filter)
 
 searchAndOpen (array $filter)
 
 searchAndSelect (array $filter)
 
 selectMassAction ($massActionSelection)
 
 selectAction ($action)
 
 selectItems (array $items, $isSortable=true)
 
 sortGridByField ($field, $sort="desc")
 
 sortByColumn ($columnLabel)
 
 getFirstItemId ()
 
 getAllIds ()
 
 getColumnValue ($id, $headerLabel)
 
 fullTextSearch ($text)
 
 getRowsData (array $columns)
 
- Public Member Functions inherited from Grid
 search (array $filter)
 
 searchAndOpen (array $filter)
 
 searchAndSelect (array $filter)
 
 resetFilter ()
 
 massaction (array $items, $action, $acceptAlert=false, $massActionSelection='')
 
 getRowsData (array $columns)
 
 isRowVisible (array $filter, $isSearchable=true, $isStrict=true)
 
 sortGridByField ($field, $sort="desc")
 
 isFirstRowVisible ()
 
 openFirstRow ()
 

Protected Attributes

 $importProducts = '[data-role="action"]'
 
 $filters
 
- Protected Attributes inherited from DataGrid
 $editLink = '.action-menu-item[href*="edit"]'
 
 $appliedFiltersList = '[data-role="filter-list"]'
 
 $filterButton = '[data-action="grid-filter-expand"]'
 
 $selectItem = 'tbody tr [data-action="select-row"]'
 
 $rowTemplate = 'td[*[contains(.,normalize-space("%s"))]]'
 
 $rowTemplateStrict = 'td[*[text()[normalize-space()="%s"]]]'
 
 $massActionToggleButton = '//th//button[@data-toggle="dropdown"]'
 
 $massActionToggleList = './/span[contains(@class, "action-menu-item") and .= "%s"]'
 
 $actionButton = '.action-select'
 
 $actionList = './/span[contains(@class, "action-menu-item") and .= "%s"]'
 
 $columnHeader = './/*[@data-role="grid-wrapper"]//th/span[.="%s"]'
 
 $rowById = ".//tr[td//input[@data-action='select-row' and @value='%s']]"
 
 $columnNumber = ".//th[span[.='%s']][not(ancestor::*[@class='sticky-header'])]/preceding-sibling::th"
 
 $cellByHeader = "//td[%s+1]"
 
 $fullTextSearchField = '.data-grid-search-control-wrap .data-grid-search-control'
 
 $fullTextSearchButton = '.data-grid-search-control-wrap .action-submit'
 
 $noRecords = '[class$=no-data]'
 
 $alertModal = '._show[data-role=modal]'
 
 $sortLink = './/div[@data-role="grid-wrapper"]//th[contains(@class, "%s")]/span[contains(text(), "%s")]'
 
 $currentPage = ".//*[@data-ui-id='current-page-input'][not(ancestor::*[@class='sticky-header'])]"
 
- Protected Attributes inherited from Grid
 $filters = []
 
 $searchButton = '[data-action="grid-filter-apply"]'
 
 $sortLink = "[name='%s'][title='%s']"
 
 $resetButton = '[data-action="grid-filter-reset"]'
 
 $rowItem = 'tbody tr'
 
 $lastRowItem = 'tbody tr:last-child'
 
 $editLink = 'td[class*=col-action] a'
 
 $selectItem = 'tbody tr [type="checkbox"]'
 
 $selectAll = '.massaction a[onclick*=".selectAll()"]'
 
 $massactionSelect = '[id*=massaction-select]'
 
 $massactionAction = '[data-menu="grid-mass-select"]'
 
 $massactionSubmit = '[id*=massaction-form] button'
 
 $templateBlock = './ancestor::body'
 
 $waitForSelectorType = Locator::SELECTOR_CSS
 
 $waitForSelectorVisible = true
 
 $option = '[name="status"]'
 
 $active = '[class=*_active]'
 
 $rowTemplate = 'td[contains(.,normalize-space("%s"))]'
 
 $rowTemplateStrict = 'td[text()[normalize-space()="%s"]]'
 
 $loader = '[data-role="spinner"]'
 
 $actionNextPage = '[class*=data-grid-pager] .action-next'
 
 $actionNextPageDisabled = '[class*=data-grid-pager] .action-next.disabled'
 
 $firstRowSelector = ''
 
 $noRecords = '.empty-text'
 
 $rowPattern = '//tbody/tr[%s]'
 
 $confirmModal = '.confirm._show[data-role=modal]'
 

Additional Inherited Members

- Protected Member Functions inherited from DataGrid
 waitFilterToLoad ()
 
 openFilterBlock ()
 
 clickEditLink (SimpleElement $rowItem)
 
- Protected Member Functions inherited from Grid
 getTemplateBlock ()
 
 prepareForSearch (array $filters)
 
 waitLoader ()
 
 getRow (array $filter, $isStrict=true)
 
 nextPage ()
 
 xpathEscape ($query, $defaultDelim='"')
 

Detailed Description

'Import custom options to product' grid.

Definition at line 14 of file Grid.php.

Member Function Documentation

◆ addProducts()

addProducts ( )

Press 'Import' button.

Returns
void

Definition at line 39 of file Grid.php.

40  {
41  $this->_rootElement->find($this->importProducts)->click();
42  $this->getTemplateBlock()->waitForElementNotVisible($this->importProducts);
43  }

Field Documentation

◆ $filters

$filters
protected
Initial value:
= [
'sku' => [
'selector' => 'input[name=sku]',
],
]

Definition at line 28 of file Grid.php.

◆ $importProducts

$importProducts = '[data-role="action"]'
protected

Definition at line 21 of file Grid.php.


The documentation for this class was generated from the following file: