- Where Developers Learn, Share, & Build Careers
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 usually 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 never change the resolution / window size, and in these corner cases, work with pure JavaScript:
((javascript excl.) Driver) .executeScript ("logic [0]. Click "), inputElement);
Comments
Post a Comment