Not able to capture right images using page dump when the page needs to be scrolled

117 views
Skip to first unread message

arika...@gmail.com

unread,
Feb 4, 2017, 8:11:06 AM2/4/17
to Galen Framework

I am trying to use image comparison feature of galen. In order to get expected images for my test, i used page dump feature as recommended. However, i am not getting the right image of the element specified in the spec file. To explain things in detail this is what i did for galenframework website:

1) My test.js looks like this -

test("Galen page", function() {
  var driver = createDriver("http://galenframework.com",
                            "1366x885");

  
sleep(8000);

  dumpPage({
    driver: driver, 
    name: "Galen page", 
    spec: "specs/galen_site.gspec",
    exportPath: "dumps/galenpage",
    onlyImages: true
});


  function sleep(delay) {
    var start = new Date().getTime();
    while (new Date().getTime() < start + delay);
  }


});

2) galen_site.gspec looks like this -

@objects
selenium_grid_image xpath (//img[contains(@class,'home-slide')])[2]
responsive_design_image xpath (//img[contains(@class,'home-slide')])[3]

3) I made following changes to galen.config -

galen.browser.screenshots.fullPage = true

galen.browser.screenshots.fullPage.scrollWait = 5000


When i run the test file i get following images -
  -> responsive_design_image.png

 -> selenium_grid_image.png

 -> screen.img



These are obviously wrong images. Also as you see in screen.png there are duplicated elements of the page being displayed. I think galen keeps scrolling and keeps taking screenshots and then attaches it all together resulting in duplicate data/images being shown and probably that's the same reason why incorrect images appear in the page dumps. Is there a way to get around this problem. I would really like to use the image comparison feature provided in Galen

Thanks in advance.




arika...@gmail.com

unread,
Feb 5, 2017, 11:21:11 AM2/5/17
to Galen Framework
Uhhh! the images are not being displayed but i hope the issue mentioned is clear.

Ivan Shubin

unread,
Feb 9, 2017, 12:36:36 PM2/9/17
to Galen Framework
Looks like there is a problem with taking full page screenshots but without seeing the image it is hard to see what is exactly going wrong.

ago...@thoughtworks.com

unread,
Feb 11, 2017, 4:44:23 AM2/11/17
to Galen Framework
Let me try putting the images again -

responsive_design_image.png



selenium_grid_image.png





ago...@thoughtworks.com

unread,
Feb 11, 2017, 4:47:45 AM2/11/17
to Galen Framework
screen.png  (cropped image) -


Reply all
Reply to author
Forward
0 new messages