Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-functional-testing-framework
src
Magento
FunctionalTestingFramework
Extension
ReadinessMetrics
MagentoLoadingMasks.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics
;
8
9
use Facebook\WebDriver\Exception\NoSuchElementException;
10
use Facebook\WebDriver\Exception\StaleElementReferenceException;
11
use
Magento\FunctionalTestingFramework\Module\MagentoWebDriver
;
12
use WebDriverBy;
13
19
class
MagentoLoadingMasks
extends
AbstractMetricCheck
20
{
27
protected
function
doesMetricPass
(
$value
)
28
{
29
return
$value
===
null
;
30
}
31
37
protected
function
fetchValueFromPage
()
38
{
39
foreach
(
MagentoWebDriver::$loadingMasksLocators
as $maskLocator) {
40
$driverLocator = WebDriverBy::xpath($maskLocator);
41
$maskElements = $this->
getDriver
()->webDriver->findElements($driverLocator);
42
foreach
($maskElements as
$element
) {
43
try
{
44
if
(
$element
->isDisplayed()) {
45
return
"$maskLocator : "
.
$element
->getID();
46
}
47
}
catch
(NoSuchElementException $e) {
48
}
catch
(StaleElementReferenceException $e) {
49
}
50
}
51
}
52
return
null
;
53
}
54
}
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics\AbstractMetricCheck
Definition:
AbstractMetricCheck.php:21
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics
Definition:
AbstractMetricCheck.php:7
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics\MagentoLoadingMasks\doesMetricPass
doesMetricPass($value)
Definition:
MagentoLoadingMasks.php:27
$value
$value
Definition:
gender.phtml:16
Magento\FunctionalTestingFramework\Module\MagentoWebDriver
Definition:
MagentoWebDriver.php:44
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics\MagentoLoadingMasks\fetchValueFromPage
fetchValueFromPage()
Definition:
MagentoLoadingMasks.php:37
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics\MagentoLoadingMasks
Definition:
MagentoLoadingMasks.php:19
Magento\FunctionalTestingFramework\Module\MagentoWebDriver\$loadingMasksLocators
static $loadingMasksLocators
Definition:
MagentoWebDriver.php:52
Magento\FunctionalTestingFramework\Extension\ReadinessMetrics\AbstractMetricCheck\getDriver
getDriver()
Definition:
AbstractMetricCheck.php:206
$element
$element
Definition:
element.phtml:12