Skip to content

Commit 51748ba

Browse files
committed
Merge pull request #90 from javigomez/improveadminlogout
Avoid False positives on Admin logout
2 parents 3a2e47c + c2d3442 commit 51748ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/JoomlaBrowser.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,11 @@ public function doAdministratorLogout()
479479
$I = $this;
480480
$I->click(['xpath' => "//ul[@class='nav nav-user pull-right']//li//a[@class='dropdown-toggle']"]);
481481
$this->debug("I click on Top Right corner toggle to Logout from Admin");
482-
$I->waitForElement(['xpath' => "//a[text() = 'Logout']"], 10);
483-
$I->click(['xpath' => "//a[text() = 'Logout']"]);
484-
$I->waitForText('Log in', 20);
485-
$I->waitForElement(['id' => 'mod-login-username'], 10);
482+
$I->waitForElement(['xpath' => "//li[@class='dropdown open']/ul[@class='dropdown-menu']//a[text() = 'Logout']"], 60);
483+
$I->click(['xpath' => "//li[@class='dropdown open']/ul[@class='dropdown-menu']//a[text() = 'Logout']"]);
484+
$I->waitForElement(['id' => 'mod-login-username'], 60);
485+
$I->waitForText('Log in', 60, ['xpath' => "//fieldset[@class='loginform']//button"]);
486+
486487
}
487488

488489
/**

0 commit comments

Comments
 (0)