Search in sources :

Example 1 with ShootingStrategy

use of ru.yandex.qatools.ashot.shooting.ShootingStrategy in project ashot by yandex-qatools.

the class ScalingDecoratorTest method testDpr.

@SuppressWarnings("UnusedDeclaration")
@Test
public void testDpr() throws Exception {
    ShootingStrategy dpr2Strategy = new ScalingDecorator(new SimpleShootingStrategy()).withDpr(2);
    Screenshot screenshot = new AShot().shootingStrategy(dpr2Strategy).takeScreenshot(getDriver());
    assertThat(screenshot.getImage(), ImageTool.equalImage(loadImage("img/expected/dpr.png")));
}
Also used : AShot(ru.yandex.qatools.ashot.AShot) ShootingStrategy(ru.yandex.qatools.ashot.shooting.ShootingStrategy) SimpleShootingStrategy(ru.yandex.qatools.ashot.shooting.SimpleShootingStrategy) SimpleShootingStrategy(ru.yandex.qatools.ashot.shooting.SimpleShootingStrategy) TakesScreenshot(org.openqa.selenium.TakesScreenshot) Screenshot(ru.yandex.qatools.ashot.Screenshot) ScalingDecorator(ru.yandex.qatools.ashot.shooting.ScalingDecorator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TakesScreenshot (org.openqa.selenium.TakesScreenshot)1 AShot (ru.yandex.qatools.ashot.AShot)1 Screenshot (ru.yandex.qatools.ashot.Screenshot)1 ScalingDecorator (ru.yandex.qatools.ashot.shooting.ScalingDecorator)1 ShootingStrategy (ru.yandex.qatools.ashot.shooting.ShootingStrategy)1 SimpleShootingStrategy (ru.yandex.qatools.ashot.shooting.SimpleShootingStrategy)1