Skip to content

Commit cf4d9df

Browse files
committed
Improve locators in doAdministratorLogin
1 parent 85d24b2 commit cf4d9df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JoomlaBrowser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public function doAdministratorLogin()
3737
$this->debug('I open Joomla Administrator Login Page');
3838
$I->amOnPage('/administrator/index.php');
3939
$this->debug('Fill Username Text Field');
40-
$I->fillField('#mod-login-username', $this->config['username']);
40+
$I->fillField(['id' => 'mod-login-username'], $this->config['username']);
4141
$this->debug('Fill Password Text Field');
42-
$I->fillField('#mod-login-password', $this->config['password']);
42+
$I->fillField(['id' => 'mod-login-password'], $this->config['password']);
4343
// @todo: update login button in joomla login screen to make this xPath more friendly
4444
$this->debug('I click Login button');
45-
$I->click("//form[@id='form-login']/fieldset/div[3]/div/div/button");
45+
$I->click(['xpath' => "//form[@id='form-login']/fieldset/div[3]/div/div/button"]);
4646
$this->debug('I wait to see Administrator Control Panel');
47-
$I->waitForText('Control Panel', 10, 'H1');
47+
$I->waitForText('Control Panel', 4, ['css' => 'h1.page-title']);
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)