forked from chenkan/Dagger
-
Notifications
You must be signed in to change notification settings - Fork 1
Demo for Image Contrast
leonar edited this page Apr 18, 2013
·
5 revisions
This demo is to intriduce how to use image contrast for checking ui style.
Create demo such as:
package com.netease.demo;
import com.netease.checkuistyle.ImageProcessing;
import com.netease.dagger.BrowserEmulator;
public class CheckPageStyle {
public static void main(String[] args) throws Exception {
String githubUrl = "https://github.com/";
String checkPoint = "topbar";
String folderName = "github";
BrowserEmulator be = new BrowserEmulator();
be.open(githubUrl);//change url to https://github.com/login for contrast, remember change ScreenShotType to 2 in type.properties
ImageProcessing.process(be.getBrowserCore(), folderName, checkPoint, "//div[@class='container clearfix']");
be.quit();
}
}That's all. And you can easily understand the story:
- Start Chrome
- Open Google
- Search 'github'
- Check result
- Quit Chrome