use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.
the class TestPictureElement method testSendKeysOnPicture.
public void testSendKeysOnPicture() {
try {
DriverTestPageWithoutFixedPattern.logoText.clear();
DriverTestPageWithoutFixedPattern.picture.sendKeys("hello", 0, 40);
} 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(), "hello");
}
use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.
the class TestPictureElement method testClickOnPicture.
public void testClickOnPicture() {
try {
DriverTestPageWithoutFixedPattern.picture.clickAt(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(), "ff logo");
}
use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.
the class TestPictureElement method testClickOnGooglePicture.
/**
* test correction of issue #131 by clicking on element which does not have a "intoElement" parameter
*/
public void testClickOnGooglePicture() {
try {
DriverTestPageWithoutFixedPattern.googlePicture.click();
} 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.textElement.getValue(), "image");
}
use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.
the class TestScreenZone method testActionDurationIsLogged.
/**
* test that an action changed actionDuration value
*/
@Test(groups = { "it" })
public void testActionDurationIsLogged() {
Assert.assertEquals(DriverTestPageWithoutFixedPattern.googleForDesktopWithFile.getActionDuration(), 0);
try {
DriverTestPageWithoutFixedPattern.googleForDesktopWithFile.click();
} catch (ImageSearchException e) {
throw new SkipException("Image not found, we may be on screenless slave", e);
}
Assert.assertTrue(DriverTestPageWithoutFixedPattern.googleForDesktopWithFile.getActionDuration() > 0);
}
use of com.seleniumtests.customexception.ImageSearchException in project seleniumRobot by bhecquet.
the class TestUiElement method testSendKeysOnPicture.
public void testSendKeysOnPicture() {
try {
DriverTestPageWithoutFixedPattern.logoText.clear();
DriverTestPageWithoutFixedPattern.picture.sendKeys("hello", 0, 40);
} 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(), "hello");
}
Aggregations