function testDefaultValuesAuth()
 {
     $uname = Automation::registerNewUser($this->webDriver);
     $this->goToForm('Default Value Fields');
     $txt1 = $this->webDriver->findElement(WebDriverBy::id('edit-submitted-not-required'));
     $this->assertEquals('', $txt1->getText(), 'Should start empty');
     $txt2 = $this->webDriver->findElement(WebDriverBy::id('edit-submitted-default-value'));
     $this->assertEquals('Default', $txt2->getAttribute('value'), 'Should start Default');
     $txt3 = $this->webDriver->findElement(WebDriverBy::id('edit-submitted-default-your-name'));
     $this->assertEquals($uname, $txt3->getAttribute('value'), 'Auth user should have a name filled in');
 }
 public function testRegisterNewUser()
 {
     //    $now = time();
     //    $this->clickRegisterLink();
     //    $elements_values = array(
     //        'edit-name' => $now,
     //        'edit-mail' => "$now@example.com",
     //        'edit-pass-pass1' => 'password',
     //        'edit-pass-pass2'=> 'password',
     //    );
     //    foreach ($elements_values as $key => $value) {
     //      $element = $this->webDriver->findElement(WebDriverBy::id($key));
     //      $element->clear()->sendKeys($value);
     //    }
     //    $submit = $this->webDriver->findElement(WebDriverBy::id('edit-submit'));
     //    $submit->click();
     $now = Automation::registerNewUser($this->webDriver);
     $messages = $this->webDriver->findElement(WebDriverBy::cssSelector('.messages'));
     $expected_text = 'Registration successful. You are now logged in.';
     $actual_text = $messages->getText();
     $this->assertContains($expected_text, $actual_text, 'Registration message');
 }