webdriver - Selenium ElementNotVisibleException when enclosing div has transform applied -


i using intel's html5 app development framework. particularly, using their carousel plugin. suspect knowledge of webdriver more useful here.

the way carousel works pages float next each other inside div has limited width , overflow hidden. can see 1 of pages @ time through div "viewport".

when touch move next div, applies css transform animate sliding page divs past. works fine. webdriver has trouble elements inside animation div.

when on first page, selenium reports elements (on both pages) displayed, though half of them hidden. once have transitioned second page, selenium reports elements (on both pages) not displayed.

i tracked down css property gets applied animation div:

-webkit-transform: translate3d(-1024px, 0px, 0); 

when applied, selenium thinks element invisible. when remove using chrome developer tools, thinks visible.

two ways might able me:

  • can selenium report correctly visibility of these elements? perhaps tweaking way carousel works? (it open source).
  • can tell selenium click element anyway, though "not visible"?

this solves problem, getting around bug in selenium.

new actions(driver).movetoelement(element).click().perform(); 

selenium can click on link using code. need try , minimal example use bug report maintainers of selenium... tricky.


Comments