Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an element on the page that I'm testing that I have to scroll down to be visible. When I execute my test, I get Element is not clickable at point (94, 188) for example.

I tried the following:

dvr.executeScript('window.scrollTo(0,250);');

But it didn't work. Does anyone know how this works?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
249 views
Welcome To Ask or Share your Answers For Others

1 Answer

This seems so late to answer you.. But anyways,

The following code helped me to remove the Element is not clickable error.

var elm = element.all(by.css('.your-css-class')).get(9);
browser.executeScript("arguments[0].scrollIntoView();", elm.getWebElement());

elm.click();

Basically this allows you scroll into your view..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...