public function VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.8
Same name and namespace in other branches
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldSeeTheElementWithTheIndexHavingTheAttribute()
Find an element with a selected index having the first attribute.
Check if it's have the second one. Varbase Context #varbase.
Example #1: Then I should see the "1" "wrapper" with "align2right" class Example #2: And I should see the "2" "wrapper" with "align2right" class
@Then I should see the :nth :arg1 with :arg2 class
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 1562
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iShouldSeeTheElementWithTheIndexHavingTheAttribute($index, $wrapper, $position) {
$items = $this
->getSession()
->getPage()
->findAll('css', '.' . $wrapper);
$item = $items[$index]
->find('css', '.' . $wrapper . '.' . $position);
if (!$item) {
throw new \Exception("The image position is wrong");
}
}