Class Switcher Store switcher block
Definition at line 18 of file Switcher.php.
◆ getStoreView()
Get store view
- Returns
- string
Definition at line 53 of file Switcher.php.
55 return $this->_rootElement->find($this->dropDownButton)->getText();
◆ isStoreViewDropdownVisible()
isStoreViewDropdownVisible |
( |
| ) |
|
Check if StoreView dropdown is visible
- Returns
- bool
Definition at line 80 of file Switcher.php.
82 return $this->_rootElement->find($this->dropDownButton)->isVisible();
◆ isStoreViewVisible()
isStoreViewVisible |
( |
|
$store | ) |
|
Check is Store View Visible
- Parameters
-
- Returns
- bool
Definition at line 64 of file Switcher.php.
66 $storeViewDropdown = $this->_rootElement->find($this->dropDownButton);
68 $storeViewDropdown->click();
69 $isStoreViewVisible = $this->_rootElement->find(sprintf($this->storeViewSelector,
$store->getCode()))
71 $storeViewDropdown->click();
72 return $isStoreViewVisible;
◆ selectStoreView()
Select store
- Parameters
-
- Returns
- void
Definition at line 40 of file Switcher.php.
42 if ($this->_rootElement->find($this->dropDownButton)->isVisible() && ($this->
getStoreView() !==
$name)) {
43 $this->_rootElement->find($this->dropDownButton)->click();
44 $this->_rootElement->find(
$name, Locator::SELECTOR_LINK_TEXT)->click();
if(!isset($_GET['name'])) $name
◆ $dropDownButton
$dropDownButton = '#switcher-language-trigger' |
|
protected |
◆ $storeViewSelector
$storeViewSelector = 'li.view-%s' |
|
protected |
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/functional/tests/app/Magento/Store/Test/Block/Switcher.php