Skip to content

Commit

Permalink
firefox: Explicitly scroll element into view before clicking
Browse files Browse the repository at this point in the history
Signed-off-by: Alexei Barantsev <barancev@gmail.com>
  • Loading branch information
p0deje authored and barancev committed Nov 18, 2015
1 parent a240141 commit 2f4a6d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions javascript/firefox-driver/js/wrappedElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ WebElement.clickElement = function(respond, parameters) {

var offset = Utils.getClickablePoint(unwrapped);

var inViewAfterScroll = Utils.scrollIntoView(
unwrapped,
(respond.session.elementScrollBehavior == 0),
new goog.math.Coordinate(offset.x, offset.y));

Utils.installWindowCloseListener(respond);
Utils.installClickListener(respond, WebLoadingListener);

Expand Down

0 comments on commit 2f4a6d8

Please sign in to comment.