Search in sources :

Example 21 with ImageSearchException

use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.

the class TestUiElement method testDoubleClickOnPicture.

public void testDoubleClickOnPicture() {
    try {
        DriverTestPageWithoutFixedPattern.picture.doubleClickAt(0, -20);
    } catch (ImageSearchException e) {
        throw new SkipException("Image not found, we may be on screenless slave", e);
    }
    // in case of browser slowness
    WaitHelper.waitForMilliSeconds(500);
    Assert.assertEquals(DriverTestPageWithoutFixedPattern.logoText.getValue(), "double click ff logo");
}
Also used : ImageSearchException(com.seleniumtests.customexception.ImageSearchException) SkipException(org.testng.SkipException)

Aggregations

ImageSearchException (com.seleniumtests.customexception.ImageSearchException)21 SkipException (org.testng.SkipException)17 GenericMultiBrowserTest (com.seleniumtests.it.driver.support.GenericMultiBrowserTest)6 Test (org.testng.annotations.Test)6 KeyPoint (org.opencv.core.KeyPoint)4 MatOfKeyPoint (org.opencv.core.MatOfKeyPoint)4 Point (org.opencv.core.Point)4 IOException (java.io.IOException)3 Mat (org.opencv.core.Mat)3 Rectangle (org.openqa.selenium.Rectangle)3 CustomEventFiringWebDriver (com.seleniumtests.driver.CustomEventFiringWebDriver)2 ScreenZone (com.seleniumtests.uipage.htmlelements.ScreenZone)2 Scalar (org.opencv.core.Scalar)2 ConfigurationException (com.seleniumtests.customexception.ConfigurationException)1 File (java.io.File)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 ExecutorService (java.util.concurrent.ExecutorService)1 MinMaxLocResult (org.opencv.core.Core.MinMaxLocResult)1