2

Problem with Selenium2 test not filling in password field. Says element is not visible. I have included the error, the selenium test, and code below.

Error

Failed to test manage account settings functionality in ManageAccountSettingsCept.php Sorry, I couldn't fill field "#users_password","myPassword": Behat\Mink\Exception\ElementException: Exception thrown by (//html/descendant-or-self::*[@id = 'users_password'])[1] Element is not currently visible and so may not be interacted with

Selenium test

$I = new SeleniumGuy($scenario);
$I->wantTo('Test Manage Account Settings functionality');
$I->amOnPage('/login');
$I->fillField('#users_email','email@email.com');
$I->fillField('#users_password','myPassword');

Code

<div class="core_component_item core_diagonal_input">
     <input value="" name="users_password" id="users_password" type="password"  style="border:none;margin-left:8px;margin-top:6px;color:#33322e;background-color:transparent;outline:0;resize:none; width:220px;border:solid 1px transparent; " class="core_input_text">
</div>
Ben
  • 60,438
  • 111
  • 314
  • 488
  • It claims it's not visible, is this true? What happens if you remove those `transparent` borders & background? (And why would you have 2 competing `border` definitions?) Another thing to try is to add a `placeholder`, perhaps that triggers something. – Wrikken Feb 10 '14 at 19:37
  • I think you have another element with the same id on the page, check this post: http://stackoverflow.com/a/16162026/716691 – CodeBird Feb 10 '14 at 19:38
  • another link: http://www.seleniumwebdriver.com/google-selenium-webdriver/elementnotvisibleexception-element-is-not-currently-visible-and-so-may-not-be-i/ hope these help – CodeBird Feb 10 '14 at 19:44
  • I have the similar problem, it seems some javascripts affected it – Capitaine Aug 25 '15 at 20:13

0 Answers0