Selenium webdriver script fails to execute sendkey() in IE 8 when running it from jenkins -


I have a Selenium grid setup with hubs running on the CI (Jenkins) server whenever I build my project from Jenkins And then fails to execute it:

  WebElement inputElement = driver.findElement (By.xpath ("// a [contains (@href, \" / case / add ") ] ")); InputElement.sendKeys (Keys.ENTER); Or rather Selenium thinks that it did and it runs on the next order i.e.  selenium.select ("id = lifeoffice", "label = amp";);   

Nodes are virtual machines that each run a different browser and this problem occurs when the script is being executed on IE 8 browser. When I run the script right from my IDE.

I used the click (); Try using and ((javascript exclaimer) driver). ExecuteScript ("argument [0] .fireEvent ('onclick');", inputElement); And I have the same problem ...

This would be strange, but sendkeys Try taking a look at the page immediately after the order. If the element just outside or just inside viewport, to touch almost the border:

Element has never been noticed because it is hidden behind it The browser's scrollbar / statusbar / a piece of page that covers it will generally scroll the IE element in the viewport and focus it, but sometimes in the case of the edge, it will not be. And the focus (or click or some) call is then called on the empty piece of screen / scrollbar / page.

An alternative solution? I only know about two:

  • Change the computer's resolution / window size / IE layout (make it fullscreen or disable toolbar etc.)
  • Make sure you do not change the resolution / window size, etc. and work with pure javascript in these corner cases:

      ((javascript excl.) Driver) .executeScript ("logic [0]. Click "), inputElement);      

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -