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
Page
Objects
ElementObject.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\FunctionalTestingFramework\Page\Objects
;
7
8
use
Magento\FunctionalTestingFramework\Exceptions\XmlException
;
9
13
class
ElementObject
14
{
15
const
DEFAULT_TIMEOUT_SYMBOL
=
'-'
;
16
22
private
$name;
23
29
private
$type;
30
36
private
$selector;
37
43
private
$locatorFunction;
44
50
private
$timeout;
51
57
private
$parameterized;
58
69
public
function
__construct
($name, $type, $selector, $locatorFunction, $timeout, $parameterized)
70
{
71
if
($selector !=
null
&& $locatorFunction !=
null
) {
72
throw
new
XmlException
(
"Element '{$name}' cannot have both a selector and a locatorFunction."
);
73
}
elseif
($selector ==
null
&& $locatorFunction ==
null
) {
74
throw
new
XmlException
(
"Element '{$name}' must have either a selector or a locatorFunction.'"
);
75
}
76
77
$this->
name
= $name;
78
$this->type = $type;
79
$this->selector = $selector;
80
$this->locatorFunction = $locatorFunction;
81
if
(strpos($locatorFunction,
"Locator::"
) ===
false
) {
82
$this->locatorFunction =
"Locator::"
. $locatorFunction;
83
}
84
$this->timeout = $timeout;
85
$this->parameterized = $parameterized;
86
}
87
93
public
function
getName
()
94
{
95
return
$this->name;
96
}
97
103
public
function
getType
()
104
{
105
return
$this->type;
106
}
107
113
public
function
getSelector
()
114
{
115
return
$this->selector;
116
}
117
123
public
function
getLocatorFunction
()
124
{
125
return
$this->locatorFunction;
126
}
127
133
public
function
getPrioritizedSelector
()
134
{
135
return
$this->selector ?: $this->locatorFunction;
136
}
137
143
public
function
getTimeout
()
144
{
145
if
($this->timeout ==
ElementObject::DEFAULT_TIMEOUT_SYMBOL
) {
146
return
null
;
147
}
148
149
return
(
int
)$this->timeout;
150
}
151
157
public
function
isParameterized
()
158
{
159
return
$this->parameterized;
160
}
161
}
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getSelector
getSelector()
Definition:
ElementObject.php:113
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getType
getType()
Definition:
ElementObject.php:103
name
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getPrioritizedSelector
getPrioritizedSelector()
Definition:
ElementObject.php:133
Magento\FunctionalTestingFramework\Exceptions\XmlException
Definition:
XmlException.php:14
Magento\FunctionalTestingFramework\Page\Objects\ElementObject
Definition:
ElementObject.php:13
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\isParameterized
isParameterized()
Definition:
ElementObject.php:157
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getTimeout
getTimeout()
Definition:
ElementObject.php:143
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\__construct
__construct($name, $type, $selector, $locatorFunction, $timeout, $parameterized)
Definition:
ElementObject.php:69
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getName
getName()
Definition:
ElementObject.php:93
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\getLocatorFunction
getLocatorFunction()
Definition:
ElementObject.php:123
Magento\FunctionalTestingFramework\Page\Objects
Definition:
ElementObject.php:6
Magento\FunctionalTestingFramework\Page\Objects\ElementObject\DEFAULT_TIMEOUT_SYMBOL
const DEFAULT_TIMEOUT_SYMBOL
Definition:
ElementObject.php:15