Skip to content

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

@Aasu29

Description

@Aasu29

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions