public function testFindElementsShouldGetOneOfFoundElementsText()
{
$selectBox = $this->_driver->findElement(By::id("sel1"));
$selectBoxOptions = $selectBox->findElements(By::tagName("option"));
foreach ($selectBoxOptions as $selectBoxOption) {
$this->assertTrue($selectBoxOption instanceof WebElement);
if ($selectBoxOption->getAttribute("value") == "4") {
$selectBoxOption->click();
}
}
foreach ($selectBoxOptions as $selectBoxOption) {
if ($selectBoxOption->getAttribute("selected") == "true") {
$this->assertEquals("Black", $selectBoxOption->getText());
}
}
}