Bug 1255955 - Recalculate visibility after scrolling; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 05 Aug 2016 11:00:19 +0100
changeset 398568 990378614f0c12f5306246d27990473453891300
parent 398567 0ab43f79ef48e6ef1369664c890f99ff9b02f7a3
child 398569 53effab5d0d1d7612ed2271635d951e4ee4906b9
push id25574
push userbmo:ato@mozilla.com
push dateTue, 09 Aug 2016 13:26:03 +0000
reviewersautomatedtester
bugs1255955
milestone51.0a1
Bug 1255955 - Recalculate visibility after scrolling; r?automatedtester 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");
   }