Skip to content

Commit a941bb6

Browse files
author
Dmytro Aponasenko
committed
Merge branch 'MTA-1821' of https://github.corp.ebay.com/magento-qmt/magento2ce into develop
2 parents f820f1e + ec2d77f commit a941bb6

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

dev/tests/functional/lib/Magento/Mtf/Client/Element/OptgroupselectElement.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
*/
1414
class OptgroupselectElement extends SelectElement
1515
{
16-
/**
17-
* Option locator.
18-
*
19-
* @var string
20-
*/
21-
protected $optionByIndex = './/option';
22-
2316
/**
2417
* Option group selector.
2518
*
@@ -44,14 +37,7 @@ public function getValue()
4437
{
4538
$this->eventManager->dispatchEvent(['get_value'], [(string)$this->getAbsoluteSelector()]);
4639

47-
$selectedLabel = '';
48-
$labels = $this->getElements($this->optionByIndex, Locator::SELECTOR_XPATH);
49-
foreach ($labels as $label) {
50-
if ($label->isSelected()) {
51-
$selectedLabel = $label->getText();
52-
break;
53-
}
54-
}
40+
$selectedLabel = parent::getValue();
5541
if ($selectedLabel == '') {
5642
throw new \Exception('Selected value has not been found in optgroup select.');
5743
}

dev/tests/functional/lib/Magento/Mtf/Client/Element/SelectstoreElement.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
*/
1414
class SelectstoreElement extends SelectElement
1515
{
16-
/**
17-
* Option locator
18-
*
19-
* @var string
20-
*/
21-
protected $optionByIndex = './/optgroup/option[%d]';
22-
2316
/**
2417
* Store option group selector.
2518
*

0 commit comments

Comments
 (0)