setBrowser(Helper::getBrowserString()); $this->setBrowserUrl(TESTSUITE_PHPMYADMIN_HOST . TESTSUITE_PHPMYADMIN_URL); $this->_txtUsername = 'pma_user'; $this->_txtPassword = 'abc_123'; } /** * Creates and removes a user * * @return void */ public function testCreateRemoveUser() { $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); $this->click("link=Users"); $this->waitForElementPresent("fieldset_add_user"); $this->click("link=Add user"); $this->waitForElementPresent("fieldset_add_user_login"); $this->type("name=username", $this->_txtUsername); $this->select("id=select_pred_hostname", "label=Local"); $this->click("id=button_generate_password"); $this->assertNotEquals("", $this->getValue("text_pma_pw")); $this->assertNotEquals("", $this->getValue("text_pma_pw2")); $this->assertNotEquals("", $this->getValue("generated_pw")); $this->type("id=text_pma_pw", $this->_txtPassword); $this->type("id=text_pma_pw2", $this->_txtPassword); $this->waitForElementPresent("fieldset_add_user_database"); $this->click("id=createdb-1"); $this->click("id=createdb-2"); $this->waitForElementPresent("fieldset_user_global_rights"); $this->click("link=Check All"); $this->waitForElementPresent("fieldset_add_user_footer"); $this->click("name=adduser_submit"); $this->waitForElementPresent("css=span.ajax_notification"); $this->assertElementPresent("css=span.ajax_notification div.success"); $this->waitForElementPresent("usersForm"); $temp = $this->_txtUsername."localhost"; $this->click( "xpath=(//input[@name='selected_usr[]'])[@value='".$temp."']" ); $this->click("id=checkbox_drop_users_db"); $this->getConfirmation(); $this->click("id=buttonGo"); $this->waitForElementPresent("css=span.ajax_notification"); $this->assertElementPresent("css=span.ajax_notification div.success"); } }