Hi,
I am currently writing UITest with Appium for my Android app as well as iOS app.
I am trying to find an element on a custom Dialog, but not found a solution yet.
Any advices?
P/S: I am developing the app using Xamarin with Arc UserDialogs plugin for showing dialogs.
Thank you.
cesarv
2
You might want to use the findElementByImage()
methods available in the Driver classes and other methods for locating images. For instance:
File target = new File("customDialog.png");
WebElement element = driver.findElementByImage(
Base64.getEncoder().encodeToString(
Files.readAllBytes(target.toPath())
)
);
element.click();
Keep in mind that you’ll need to install opencv4nodejs. Assuming you’re using macOS, you’ll need to install OpenCV first.