Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any support to android espresso/uiautomator, I tried but BufferedImage & ImageIO not supported in android #338

Open
Aasu29 opened this issue Oct 18, 2022 · 0 comments

Comments

@Aasu29
Copy link

Aasu29 commented Oct 18, 2022

tired other way to set images path but it does not support with makeDiff method. Is there any support for File path ?
if I use path then error is Cannot resolve method 'makeDiff(java.lang.String, java.lang.String)'
code use as file path but does not work-
File sdCard = Environment.getExternalStorageDirectory();
String path1, path2;
path1 = sdCard.getAbsolutePath() + "/1.jpg";
path2 = sdCard.getAbsolutePath() + "/cam1.jpg";

code used -

BufferedImage actualImage = ImageIO.read(new File("/Users/ashokd/Desktop/a.png"));
BufferedImage expectedImage = ImageIO.read(new File("/Users/ashokd/Desktop/b.png"));

    ImageDiffer imgDiff = new ImageDiffer();
    ImageDiff diff = imgDiff.makeDiff(actualImage, expectedImage);
    if(diff.hasDiff()==true)
    {
        System.out.println("Images are Not Same");
    }
    else {
        System.out.println("Images are Same");
    }

[
Screenshot 2022-10-18 at 4 06 59 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant