Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (83 sloc) 3.352 kB
<?php /*
Feb 29, 2012
This test script uses the Custom Search
Find every person born in January 1990 or earlier
1. open sd99
2. log in
3. open custom search / birthday search
4. set parameters
5. run search
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
require_once 'SampleGenerator.php';
require_once 'Config.php';
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
protected $captureScreenshotOnFailure = FALSE;
protected $screenshotPath = '';
protected $screenshotUrl = 'http://localhost/screenshots';
protected function setUp()
$this->settings = new BluebirdSeleniumSettings();
if (strpos($this->settings->browser,"firefox")) {
$this->captureScreenshotOnFailure = TRUE;
$this->screenshotPath = getScreenshotPath();
public function testTitle()
$myurl = getMainURL();
if (strpos($this->settings->browser,"explore")) {
$myurl_ie=$myurl.'/logout'; //IE has problems closing the session
$this->assertTitle(getMainURLTitle()); // make sure Bluebird is open
This function logs in to Bluebird using standard Username and Password
public function webtestLogin() {
$password = $this->settings->adminPassword;
$username = $this->settings->adminUsername;
// Make sure login form is available
$this->type('edit-name', $username);
$this->type('edit-pass', $password);
This function contains call for all other functions
public function performTasks() {
$this->select('birth_month', "value=1"); //1 is January in html source code
$this->assertTitle('Birthday Search');
$this->assertTrue($this->isTextPresent("Selected records only"),"Custom Search: Contacts not found in the database ");
private function openCustomSearch() {
// CUSTOM SEARCH actually is not a link
$this->click("xpath=//ul[@id='nyss-menu']/li[2]"); // using xpath to find the CUSTOM SEARCH menu
$this->waitForElementPresent('link=Proximity Search'); // wait until menu opens
$this->click('link=Birthday Search'); // click the link
$this->waitForElementPresent('_qf_Custom_refresh-bottom'); // wain until SEARCH button present
private function stop() {
Jump to Line
Something went wrong with that request. Please try again.