public function VarbaseContext::iExpandTheSelectList in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.6
Same name and namespace in other branches
- 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iExpandTheSelectList()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iExpandTheSelectList()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iExpandTheSelectList()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iExpandTheSelectList()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iExpandTheSelectList()
#varbase: To expand a select list by it's class attribute.
Example #1: I expand the "1" select list "dropbutton-multiple"
@When I expand the :nth select list :arg1
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 1366
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iExpandTheSelectList($index, $listClassName) {
$js = <<<JS
var group = document.getElementsByClassName("{<span class="php-variable">$listClassName</span>}")[{<span class="php-variable">$index</span>}];
group.className += "open";
JS;
$this
->getSession()
->executeScript($js);
}