Scrolling list solution that works in all browsers

91 views
Skip to first unread message

Rick Simpson

unread,
Feb 25, 2015, 9:33:31 PM2/25/15
to seleniu...@googlegroups.com
Here's my problem, I'm working on a site that has a list of items within a window on the page. The list of items is longer than the window they are displayed in, so it has a scroll bar to navigate the list.  It's an odd list in that it's defined by divs and ul tags only.   

Initially I used actions to scroll the list and select items.  Everything seemed fine.  Then I ran tests in all the major browsers only to discover Safari doesn't support actions--back to the drawing board. (It struck me as odd that this long after actions were introduced the SA driver didn't support them, but such is life.)

I updated the code to use JS code to do the scrolling instead.  Here's the code:

((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element);


I did a bunch of local testing in FF, CH and SA and everything worked fine. Then I set up a Jenkins job to run a few tests in all the browsers, and the everything looked good until it got to CH.  Mind you, running the same tests locally using CH works perfectly.  Heck, even IE worked fine and that never happens. 

When I run the tests in CH on our grid, every test gets the same basic error trying to click something that has been scrolled into view:

unknown error: Element is not clickable at point (395, 269). Other element would receive the click: <div class="plans_tabs_contents">...</div>
  (Session info: chrome=40.0.2214.115)
  (Driver info: chromedriver=2.12.301326 (093c7e07b4a916b690e784b0374c7f618f1ea4be),platform=Mac OS X 10.8.1 x86_64)

Looking at screen shots at the failure point shows the items are in view, and not obscured, at least visually.  

I've using the same options for the local SA driver and the Remote Driver.  I can't think of what else could be different than the local execution and the grid execution.  I'm looking for any suggestions of other things to check at this point.

Really, what I want is all the drivers to work the same way.

Thanks in advance.
R

Selenium Framework

unread,
Feb 26, 2015, 1:23:33 AM2/26/15
to seleniu...@googlegroups.com
It is interesting what you mention, but not surprising as I have faced in some rare circumstances. To narrow down the issue, can you check the following 

1) Is the chromedriver.exe that you use on jenkins and the ones you used while testing locally the same ?

If you can give the URL and more information that folks can try more rather than shooting arrows in the dark, that might further help you too

cheers,

CH!NN@ K

unread,
Feb 26, 2015, 3:35:07 AM2/26/15
to seleniu...@googlegroups.com
Webpage Scroll Down, Scroll Up and Scroll Bottom using Selenium WebDriver:

http://techlearn.in/content/webpage-scroll-down-scroll-and-scroll-bottom-using-selenium-webdriver

---
Thanks & Regards,
Purushotham Karimbedu,
Drupal Developer and QA Engineer,
Website for Selenium : http://techlearn.in


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5cc1cfbb-cd7f-4e13-a0f6-69a4bfcfb673%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rick Simpson

unread,
Feb 26, 2015, 7:54:28 PM2/26/15
to seleniu...@googlegroups.com
I've checked the browser version and chrome driver versions and I'm using the same versions locally as I am on the node machines.  Unfortunately the site is behind a firewall so I can't provide a URL.

I also forgot to point out yesterday that Win CH works as well.  So it's just Mac CH run via a hub.

R

Rick Simpson

unread,
Feb 27, 2015, 5:31:42 PM2/27/15
to seleniu...@googlegroups.com
I ended up just using JS to perform the click action.  There was clearly something about the Chromedriver that didn't like how the site was constructed.  
Reply all
Reply to author
Forward
0 new messages