Skip to content

Need scrolling API for visualTest  #5

Description

@vrozaev

Problem:
Right now visualTest didn't provide any API for page scroll. The only thing which you can do is open the page and take screenshot right after that.

visualTest({
    url: basicPageUrl,
    width: 640,
    height: 480,
    missingBaseline: 'snapshot'
}),

In other tests I can write this:

registerSuite({
	name: 'longPage',

	'footer': function () {
		return this.remote
			.get(longPageUrl)
			.setWindowSize(height, width)

			.touchScroll(null, null, offset)
			.takeScreenshot()
			.then(assertVisuals(this, {
				missingBaseline: 'snapshot'
			}));
         }
});

But the "touchScroll" didn't guarantee you that you scroll to the right position.
And seems that it's didn't wait for scroll complete.

Questions:

  1. How I should scroll page when I write test manually, without "visualTest"?
  2. Is it possible to provide API for making screenshot of specified part of the page?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions