title: Selenium and websocket
body: <p>I have a javaEE applcation server and I want to run selenium starter.
  So I wanted to first log in my application with this little script:</p>
  
  <pre><code>public class SeleniumTestKheops {
  static WebDriver driver;
  static Wait&lt;WebDriver&gt; wait;
  
  public static void main(String[] args) throws InterruptedException {
      driver = new FirefoxDriver();
      wait= new WebDriverWait(driver, 30);
  
  
      final String url = "https://localhost:8444/myApp/";
  
      driver.navigate().to(url);
  
      try {
          System.out.println(driver.getPageSource());
  
          driver.findElement(By.id("11_input")).sendKeys("login");
          driver.findElement(By.id("14_input")).sendKeys("password");
  
  
          driver.wait(30000);
      } finally {
          driver.close();
      }
    }
  }
  </code></pre>
  
  <p>But it's not working because the Selenium script do not find the <code>id 11_input</code>.
  To check what the script is seeing I printed the code of the page with :</p>
  
  <pre><code>System.out.println(driver.getPageSource());
  </code></pre>
  
  <p>And there is no <code>id 11_input</code>. The things is I have different result of the page when I display it with Ctrl + u or when I use the console too with F12.
  For the login form the code source page is :</p>
  
  <pre><code>&lt;div id="main" class="container-fluid" role="main"&gt;
  
      &lt;/div&gt;
  
      &lt;form hidden name="formLogin" method="POST" action="/kheops/"&gt;
          &lt;input type="hidden" name="home" value="true"&gt;
      &lt;/form&gt;
  
  
  
      &lt;form hidden name="formLogout" method="POST" action="/kheops/"&gt;
          &lt;input type="hidden" name="home" value="false"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>But when i use the firefox console i have :</p>
  
  <pre><code>&lt;div id="36"&gt;&lt;div class="form-group "&gt;
  &lt;div&gt;
  &lt;input class="form-control" id="36_input" placeholder="" 
  value="" onfocus="send(36,3214324915873);" onclick="event.stopPropagation();" 
  onkeypress="KIEnter(36, event, this, 3214324941411);" 
  onblur="KIBlur(36, event, this, 3214324938106);" 
  type="text"&gt;
  </code></pre>
  
  <p>
  </p>
  
  <pre><code>&lt;div id="39"&gt;
  &lt;div class="form-group "&gt;
  &lt;input class="form-control" id="39_input" placeholder="" value="" 
  onfocus="send(39,3214325172158);" 
  onblur="KIBlur(39, event, this, 3214325191988);" 
  onkeypress="KIEnter(39, event, this, 3214325195293);" type="password"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My colleague told me the source code page was dynamically generated by a websocket. So i guess (but I'm not sure) that the websocket is the problem.
  I'm new to websocket and Selenium.
  I don't anderstand why the second code is not displayed when i display the source code of the page.
  Is there somethings i have to do in my scripts to access the field of the form, like a parameters in my driver that will work in my websocket ?</p>
  
  <p>Any help would be welcome.</p>