public function login($username = '', $password = '')
{
if ($username == '') {
$username = $GLOBALS['TESTSUITE_USER'];
}
if ($password == '') {
$password = $GLOBALS['TESTSUITE_PASSWORD'];
}
$this->url('');
$this->waitForElementNotPresent('byId', 'cfs-style');
/* Return if already logged in */
if ($this->isSuccessLogin()) {
return;
}
$usernameField = $this->waitForElement('byId', 'input_username');
$usernameField->value($username);
$passwordField = $this->byId('input_password');
$passwordField->value($password);
$this->byId('input_go')->click();
}