File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
dev/tests/functional/lib/Magento/Mtf/Client/Element Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 13
13
*/
14
14
class DropdownmultiselectElement extends MultiselectElement
15
15
{
16
+ /**
17
+ * Selector for expanding dropdown.
18
+ *
19
+ * @var string
20
+ */
21
+ protected $ toggle = 'div ' ;
22
+
16
23
/**
17
24
* Selected option selector.
18
25
*
@@ -36,7 +43,7 @@ class DropdownmultiselectElement extends MultiselectElement
36
43
public function setValue ($ values )
37
44
{
38
45
$ this ->eventManager ->dispatchEvent (['set_value ' ], [__METHOD__ , $ this ->getAbsoluteSelector ()]);
39
- $ this ->click ();
46
+ $ this ->find ( $ this -> toggle )-> click ();
40
47
$ this ->deselectAll ();
41
48
$ values = is_array ($ values ) ? $ values : [$ values ];
42
49
foreach ($ values as $ value ) {
@@ -45,7 +52,7 @@ public function setValue($values)
45
52
Locator::SELECTOR_XPATH
46
53
)->click ();
47
54
}
48
- $ this ->click ();
55
+ $ this ->find ( $ this -> toggle )-> click ();
49
56
}
50
57
51
58
/**
@@ -57,12 +64,12 @@ public function getValue()
57
64
{
58
65
$ this ->eventManager ->dispatchEvent (['get_value ' ], [__METHOD__ , $ this ->getAbsoluteSelector ()]);
59
66
$ values = [];
60
- $ this ->click ();
67
+ $ this ->find ( $ this -> toggle )-> click ();
61
68
$ options = $ this ->getElements ($ this ->selectedValue );
62
69
foreach ($ options as $ option ) {
63
70
$ values [] = $ option ->getText ();
64
71
}
65
- $ this ->click ();
72
+ $ this ->find ( $ this -> toggle )-> click ();
66
73
67
74
return $ values ;
68
75
}
You can’t perform that action at this time.
0 commit comments