$this->assertRegExp($url_regexp, $location,
"You may need to set 'HOST' setting in test suite's config file to something compatible with 'web_host' defined in ini file");
- $this->byName("form_loginname")->value(FORGE_ADMIN_USERNAME);
+ $this->type("form_loginname", FORGE_ADMIN_USERNAME);
$this->type("form_pw", FORGE_ADMIN_PASSWORD);
$this->clickAndWait("login");
$this->assertTrue($this->isTextPresent("Forge Admin"));
if (preg_match('/^link=/', $link)) {
$text = substr($link, 5);
$this->byLinkText($text)->click();
+ } else {
+ //default case
+ $this->byName($link)->click();
}
}
$this->type("form_pw", $password);
$this->clickAndWait("login");
- $this->logged_in = $username ;
+ $this->logged_in = $username;
}
public function logout() {
-// $this->click("link=Log Out");
$this->open( ROOT ."/account/logout.php" );
- //$this->waitForPageToLoad();
- $this->logged_in = false ;
+ $this->logged_in = false;
}
public function switchUser($username) {
'args' => array(),
));
}
+
+ function type($name, $value) {
+ $this->byName($name)->value($value);
+ }
}
// Local Variables: