Skip to content

Commit ed91ce2

Browse files
authored
Merge pull request #175 from jatitoam/session-test
[fix] Ensured the login page is loaded before looking for cookies
2 parents 544cfdd + a752185 commit ed91ce2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/JoomlaBrowser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ public function doAdministratorLogin($user = null, $password = null, $useSnapsho
123123
$password = $this->config['password'];
124124
}
125125

126+
$this->debug('I open Joomla Administrator Login Page');
127+
$this->amOnPage($this->locator->adminLoginPageUrl);
128+
126129
if ($useSnapshot && $this->loadSessionSnapshot($user))
127130
{
128131
return;
129132
}
130133

131-
$this->debug('I open Joomla Administrator Login Page');
132-
$this->amOnPage($this->locator->adminLoginPageUrl);
133134
$this->waitForElement($this->locator->adminLoginUserName, TIMEOUT);
134135
$this->debug('Fill Username Text Field');
135136
$this->fillField($this->locator->adminLoginUserName, $user);

0 commit comments

Comments
 (0)