title: Selenium test run with Jenkins cannot interact with element
body: <p>I need to test a website on IE11, so I've made a selenium test project with IEDriver. I also use Maven. Everything works fine in local, and I now have to use Jenkins to launch my tests.</p>
  
  <p>I created a simple job to try with just one of my tests. Jenkins finds my pom.xml, opens the browser with IEDriver, navigates to my url, and then the problems begin.</p>
  
  <p>What my test does when run locally :</p>
  
  <blockquote>
    <ul>
    <li>Clicks on the "Welcome screen" to access the next page;</li>
    <li><p>Checks two elements on the new page with 3 assertions :</p>
    
    <p>1) element1.getText().trim().equalsIgnoreCase(myText1);</p>
    
    <p>2) element2.getText().trim().equalsIgnoreCase(myText2);</p>
    
    <p>3) element2.isEnabled();</p></li>
    <li><p>Clicks on element2 to get to the next page;</p></li>
    <li>Checks other elements.</li>
    </ul>
  </blockquote>
  
  <p>What my test does when launched via Jenkins :</p>
  
  <blockquote>
    <ul>
    <li>Clicks on the "Welcome screen" to access the next page; => this is OK, but easy, because this page only contains 1 element that takes all
    the screen</li>
    <li><p>Fails at checking the 2 elements :</p>
    
    <p>1) is false, and element1.getText() is blank</p>
    
    <p>2) is false, and element2.getText() is blank</p>
    
    <p>3) is true</p></li>
    <li><p>If I remove the assertions and try to directly click on element2, I have a ElementNotInteractableException</p></li>
    </ul>
  </blockquote>
  
  <p>I catch any exception to get a screenshot when there is an error. Here, the screenshot is just a black screen.</p>
  
  <p>So from what I understand, when launched with Jenkins, Selenium "knows" that there are some elements on the page (=> element2.isEnabled() is true), but does not "see" them (=> element2.getText() is empty) and cannot interact with them, as if they were "behind" the black screen and Selenium does not manage to focus the "real" screen.</p>
  
  <p>I really don't understand what is going on. I tried to run my test with Chrome Driver, I have the same problem. I'm pretty sure I'm missing something obvious.</p>
  
  <p>If you have any idea, I would greatly appreaciate it. It's my first message here, if I didn't write it in the correct way or if something is missing, you can say it too.</p>
  
  <p>Here is the stacktrace of the ElementNotInteractableException :</p>
  
  <blockquote>
    <p>org.openqa.selenium.ElementNotInteractableException: Cannot click on element</p>
    
    <p>Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
    System info: host: 'BLABLA', ip: 'BLABLA', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'</p>
    
    <p>Driver info: org.openqa.selenium.ie.InternetExplorerDriver</p>
    
    <p>Capabilities [{proxy=Proxy(), acceptInsecureCerts=false, browserVersion=11, se:ieOptions={nativeEvents=true, browserAttachTimeout=0, ie.ensureCleanSession=false, elementScrollBehavior=0, enablePersistentHover=true, ie.browserCommandLineSwitches=, ie.forceCreateProcessApi=false, requireWindowFocus=false, initialBrowserUrl=<a href="http://localhost:43020/" rel="nofollow noreferrer">http://localhost:43020/</a>, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, ignoreProtectedModeSettings=false}, timeouts={implicit=0, pageLoad=300000, script=30000}, browserName=internet explorer, pageLoadStrategy=normal, javascriptEnabled=true, platformName=WINDOWS, setWindowRect=true, platform=WINDOWS}]</p>
    
    <p>Session ID: 50e4def1-11aa-43c6-8f9e-a52cd324a1b5</p>
    
    <p>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</p>
    
    <p>at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</p>
    
    <p>at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</p>
    
    <p>at java.lang.reflect.Constructor.newInstance(Constructor.java:423)</p>
    
    <p>at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:185)</p>
    
    <p>at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:120)</p>
    
    <p>at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)</p>
    
    <p>at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)</p>
    
    <p>at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)</p>
    
    <p>at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)</p>
    
    <p>at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279)</p>
    
    <p>at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83)</p>
    
    <p>at framework.elements.CustomElement.click(CustomElement.java:141)</p>
    
    <p>at parionsDirect.pageObject.PageVeilleAccueil.clicPremiereVisite(PageVeilleAccueil.java:56)</p>
    
    <p>at testAutomatises.TestHorsConnexion.pageVeilleVisiteur(TestHorsConnexion.java:97)</p>
    
    <p>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p>
    
    <p>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</p>
    
    <p>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</p>
    
    <p>at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)</p>
    
    <p>at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)</p>
    
    <p>at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)</p>
    
    <p>at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)</p>
    
    <p>at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)</p>
    
    <p>at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)</p>
    
    <p>at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)</p>
    
    <p>at org.junit.rules.RunRules.evaluate(RunRules.java:20)</p>
    
    <p>at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)</p>
    
    <p>at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)</p>
    
    <p>at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)</p>
    
    <p>at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)</p>
    
    <p>at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)</p>
    
    <p>at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)</p>
    
    <p>at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)</p>
    
    <p>at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)</p>
    
    <p>at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)</p>
    
    <p>at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)</p>
    
    <p>at org.junit.runners.ParentRunner.run(ParentRunner.java:363)</p>
    
    <p>at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)</p>
    
    <p>at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)</p>
    
    <p>at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)</p>
    
    <p>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p>
    
    <p>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</p>
    
    <p>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</p>
    
    <p>at java.lang.reflect.Method.invoke(Method.java:498)</p>
    
    <p>at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)</p>
    
    <p>at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)</p>
    
    <p>at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)</p>
    
    <p>at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)</p>
    
    <p>at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)</p>
  </blockquote>