<div dir="ltr">According to the WebDriver specification, Firefox "SHOULD try to scroll the element into view." [1] In other words, it's recommended but the FF webdriver isn't violating the spec when it doesn't.<div><br></div><div>Take a look at the watir-scroll gem. It essentially does the JS scrolling that you mentioned (and those SO posts mention) but at least you won't be reinventing the wheel. [2] And please let us know if it works reliably as it might be worth including in mediawiki_selenium or at least recommending in the docs.</div><div><br></div><div>[1] <a href="http://www.w3.org/TR/webdriver/#methods-2">http://www.w3.org/TR/webdriver/#methods-2</a></div><div>[2] <a href="https://github.com/p0deje/watir-scroll">https://github.com/p0deje/watir-scroll</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 16, 2014 at 12:58 PM, S Page <span dir="ltr"><<a href="mailto:spage@wikimedia.org" target="_blank">spage@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Flow topics and posts have a dropdown "action menu". Tests that interact with the bottom item in the action menu started failing on Firefox because it is outside the browser window, so attempts to click it get<br></div><pre> "Element is not currently visible and so may not be interacted with"</pre>(bug 70878 [1]).<br><br></div><div>Other Selenium users have this issue[2], but that StackOverflow has comments like<br>"Selenium 2 tries to scroll to the element and then click on it" [3]<br><br>If I run the test in chromium 37 on my browser and shrink the window, chromium scrolls the window to bring the element into view. But Firefox 32 doesn't seem to scroll at all. I'm running selenium-webdriver 2.43.0 locally. Is this a known Firefox issue? Must I put JS executeScript( scrollIntoView() ) hacks into my support code?<br><br>Thanks as always.<br><br>[1] <a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=70878" target="_blank">https://bugzilla.wikimedia.org/show_bug.cgi?id=70878</a><br>[2] <a href="http://stackoverflow.com/questions/3401343/scroll-element-into-view-with-selenium" target="_blank">http://stackoverflow.com/questions/3401343/scroll-element-into-view-with-selenium</a><br>[3] <a href="http://stackoverflow.com/a/3403683/451712" target="_blank">http://stackoverflow.com/a/3403683/451712</a> (I commented there as "skierpage")<span class="HOEnZb"><font color="#888888"><br><br>-- <br><div dir="ltr">=S Page Features engineer<br></div>
</font></span></div></div>
<br>_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Dan Duvall<div>Automation Engineer</div><div><a href="http://wikimediafoundation.org" target="_blank">Wikimedia Foundation</a><br></div></div>
</div>