public class ScreenUtil
Constructor and description |
---|
ScreenUtil
() |
ScreenUtil
(double similarity) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
authenticate(String userName, String password) |
|
public void |
clickImage(String imagePath) |
|
public int |
compare(ScreenRegion o1, ScreenRegion o2) |
|
public List<ScreenRegion> |
findImages(String imagePath) Get all ScreenRegion on the screen matching the image specified in imagePath. |
|
public BufferedImage |
getScreenRegionImage() Call DesktopScreenRegion#capture()#capture() to capture the screenshot of the current screen |
|
public double |
getSimilarity() |
|
public boolean |
isImageExist(String imagePath) |
|
public void |
setSimilarity(double similarity) |
|
public void |
type(String string) |
|
public void |
typeOnImage(String imagePath, String text) |
|
public boolean |
waitForImagePresent(String imagePath, int seconds) |
Get all ScreenRegion on the screen matching the image specified in imagePath. The returned array is sorted by matched score in descending order
imagePath
- Path to target imageCall DesktopScreenRegion#capture()#capture() to capture the screenshot of the current screen