File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
dev/tests/functional/lib/Magento/Mtf/Client/Element Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -75,19 +75,9 @@ public function setValue($value)
75
75
if ($ value == '' ) {
76
76
return ;
77
77
}
78
- foreach (str_split ($ value ) as $ symbol ) {
79
- $ this ->keys ([$ symbol ]);
80
- $ searchedItem = $ this ->find (sprintf ($ this ->resultItem , $ value ), Locator::SELECTOR_XPATH );
81
- if ($ searchedItem ->isVisible ()) {
82
- try {
83
- $ searchedItem ->click ();
84
- break ;
85
- } catch (\Exception $ e ) {
86
- // In parallel run on windows change the focus is lost on element
87
- // that causes disappearing of category suggest list.
88
- }
89
- }
90
- }
78
+ $ this ->keys ([$ value ]);
79
+ $ searchedItem = $ this ->find (sprintf ($ this ->resultItem , $ value ), Locator::SELECTOR_XPATH );
80
+ $ searchedItem ->click ();
91
81
$ closeButton = $ this ->find ($ this ->closeButton );
92
82
if ($ closeButton ->isVisible ()) {
93
83
$ closeButton ->click ();
@@ -102,7 +92,9 @@ public function setValue($value)
102
92
*/
103
93
public function keys (array $ keys )
104
94
{
105
- $ this ->find ($ this ->advancedSelect )->click ();
95
+ if (!$ this ->find ($ this ->selectInput )->isVisible ()) {
96
+ $ this ->find ($ this ->advancedSelect )->click ();
97
+ }
106
98
$ input = $ this ->find ($ this ->selectInput );
107
99
$ input ->click ();
108
100
$ input ->keys ($ keys );
You can’t perform that action at this time.
0 commit comments