4

On our test page we have a username field and a password field as follows:

<input required="" placeholder="USERNAME" id="usernameIdentification" 
 class="form-control no-upper-case autoExpand textValidation" 
 autofocus="autofocus" autocapitalize="none" autocorrect="off" 
 spellcheck="false" size="20" type="text">

<input id="password" name="password" placeholder="PASSWORD" class="form-
 control no-upper-case autoExpand textValidation" required="required" 
 autofocus="" autocomplete="password" autocapitalize="none" 
 autocorrect="off" spellcheck="false" type="password" hidden="true">

The username field is filled out by selenium, we hit a next button and the next page has the password field.

Using: Firefox version 46.0.1 and Selenium version 2.53.1

The following code was working fine:

    //Enter username
    WebElement userField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("usernameIdentification")));
    userField.sendkeys(username);

    //Press next button        
    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("nextButton"))).click();

    //Fill password
    WebElement passwordField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("password")));
    passwordField.sendKeys(password);

When I update to: Firefox version 57, and selenium 3.7.1, with geckodriver 0.19.1

The code breaks, selenium will not enter text into the password field anymore, I can manually enter the password without issue, but selenium keeps insisting that the field is not visible, even though the wait check passed right before the send keys and the username field has no issues entering the text. I get this error:

> org.openqa.selenium.ElementNotInteractableException: Element is not
> visible Build info: version: '3.7.1', revision: '8a0099a', time:
> '2017-11-06T21:01:39.354Z' System info: host: 'D2QZ7XF2', ip:
> '10.122.22.31', os.name: 'Windows 10', os.arch: 'amd64', os.version:
> '10.0', java.version: '1.8.0_151' Driver info:
> org.openqa.selenium.firefox.FirefoxDriver Capabilities
> {acceptInsecureCerts: true, browserName: firefox, browserVersion:
> 57.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:headless: false, moz:processID: 15884, moz:profile:
> C:\Users\dcollier\AppData\L..., moz:webdriverClick: false,
> pageLoadStrategy: normal, platform: XP, platformName: XP,
> platformVersion: 10.0, rotatable: false, timeouts: {implicit: 0,
> pageLoad: 300000, script: 30000}} Session ID:
> b2f9536b-23ce-4c0f-93d5-cfe46d82228d
> 
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)   at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
>   at
> org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
>   at
> org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
>   at
> org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
>   at
> org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
>   at
> org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279)
>   at
> org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:100)

I also tested with latest Chrome driver and it worked fine there as well. But we need to use firefox profiles, so i need this to work there. Appears to be an issue with the gecko driver, has anyone encountered this, know of a solution? I tried several approaches but it never works.

DAC
  • 231
  • 4
  • 12
  • Issue already has been posted for this today - https://github.com/mozilla/geckodriver/issues/1074. Have you tried with downgrading the geckodriver or firefox? – Grasshopper Nov 24 '17 at 18:05
  • Thanks. I'll just stay on the older non-gecko driver version until this is fixed then. – DAC Nov 24 '17 at 18:16
  • The error you are seeing is `ElementNotInteractableException` which is possible duplicate of [How to resolve ElementNotInteractableException in Selenium webdriver?](https://stackoverflow.com/questions/43868009/how-to-resolve-elementnotinteractableexception-in-selenium-webdriver) – undetected Selenium Nov 25 '17 at 06:46
  • Not the same issue, I'm using a wait before interacting to make sure it is visible first. Also i can manually interact with the field but selenium never sees it. – DAC Nov 27 '17 at 21:00

0 Answers0