0

I´m trying to sendKeys to a element (areaText) but I keep getting error saying the areaText is not visible, but I can select this element using TAB on a element before (the keyboard cursor shows up available on textArea), and even after this it sends me error. Here´s the code:

driver.findElement(By.name("wla-value-for-id_15")).sendKeys("release");
WebElement tab = driver.findElement(By.name("wla-value-for-id_15"));
tab.sendKeys(Keys.TAB);

driver.findElement(By.id("comment")).sendKeys("projeto");

Here´s the error:

Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: Element is not visible
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'FT-GABRIEL', ip: '105.103.51.96', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\gabriel.s\AppData\Local\Temp\rust_mozprofile.4415jYdMZ26S, rotatable=false, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, moz:headless=false, platform=ANY, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=57.0, platformVersion=6.1, moz:processID=12776.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt, moz:webdriverClick=false}]
Session ID: 19e3b491-a160-4515-9318-2f0e6d5cf9ab
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:272)
    at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:96)
    at testPackage.FireFoxTest.main(FireFoxTest.java:70)

appreciate every support

Ggaran
  • 35
  • 6
  • when you press tab on the test does it scroll to the text area? – elcharrua Nov 14 '17 at 16:38
  • Sometimes adding delay right before locating and sending keys to the element helps. – Ali Nov 14 '17 at 21:19
  • Yes, when press tab scrolls to the textArea. I've already tried adding delay time too. It didn't work. – Ggaran Nov 15 '17 at 04:33
  • You can have a look at this [**`Discussion/QA`**](https://stackoverflow.com/questions/44690971/selenium-webdriver-throws-exception-in-thread-main-org-openqa-selenium-elemen/44691041#44691041) as well. – undetected Selenium Nov 15 '17 at 05:28

0 Answers0