I am trying to get an array of elements using xpath and load the results into an array and then perform assertCount()
. Here is the code I that I have. I am new to this and I am not sure why elementList is empty?
<?php
require_once('Base.php');
class FollowupTest extends Test_Base {
protected $session = null;
/**
* Asserts that the count of list elements on the page is equal
* to three utilizing an xpath expression.
*/
public function testCountListElements() {
$elementsList = $this->session->elements('xpath', '//li');
$this->assertCount(3, sizeof($elementList));
}
}