Bug 1255955 - Recalculate visibility after scrolling; r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 05 Aug 2016 11:00:19 +0100
changeset 342385 556eca85f7d722553663947684bcbd914d3b79a7
parent 342384 833ee9a9a9427b4bb385388c9630a1907b55134b
child 342386 07a530ae86fd716b59447584c59d48485fde057f
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1255955
milestone49.0
Bug 1255955 - Recalculate visibility after scrolling; r=automatedtester, a=test-only We want to redo the element interactability calculation after scrolling. Determining if an element is not visible by the old location would be wrong. MozReview-Commit-ID: KGaPVmgcqSX
testing/marionette/interaction.js
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -90,16 +90,17 @@ interaction.clickElement = function(el, 
   let win = getWindow(el);
 
   let visible = false;
   if (specCompat) {
     visible = element.isInteractable(el);
     if (!visible) {
       el.scrollIntoView(false);
     }
+    visible = element.isInteractable(el);
   } else {
     visible = element.isVisible(el);
   }
 
   if (!visible) {
     throw new ElementNotVisibleError("Element is not visible");
   }