((JavascriptExecutor)driver).executeScript( "arguments[0].style.transform = 'none';", myFavoriteElement );After setting transform = 'none', myFavoriteElement.sendKeys() did not fail with the infamous error:
Element is not currently visible and so may not be interacted with(..)So I guess we should add transform != 'none' to the list as follows:
- visibility != hidden
- display != none (is also checked against every parent element)
- opacity != 0 (in rc2 this is no longer checked for clicking an element)
- height and width are both > 0
- for an input, the attribute type != hidden
- transform != 'none'
NOTE: myFavoriteElement was an input type=file generated by the PrimeFaces fileUpload tag. PrimeFaces 4.0 looks like it introduced the transform. Also, when I checked to see what the transform value was before setting it to none, it logged: myFavoriteElement.getCssValue("transform") = matrix(4, 0, 0, 4, -300, 0).
Hope that helps.
No comments:
Post a Comment