Search in sources :

Example 1 with DeviceRotation

use of org.openqa.selenium.DeviceRotation in project java-client by appium.

the class UIAutomator2Test method testLandscapeRightRotation.

@Test
public void testLandscapeRightRotation() {
    DeviceRotation landscapeRightRotation = new DeviceRotation(0, 0, 90);
    driver.rotate(landscapeRightRotation);
    assertEquals(driver.rotation(), landscapeRightRotation);
}
Also used : DeviceRotation(org.openqa.selenium.DeviceRotation) Test(org.junit.Test)

Example 2 with DeviceRotation

use of org.openqa.selenium.DeviceRotation in project java-client by appium.

the class XCUIAutomationTest method testLandscapeLeftRotation.

@Test
public void testLandscapeLeftRotation() {
    DeviceRotation landscapeLeftRotation = new DeviceRotation(0, 0, 270);
    driver.rotate(landscapeLeftRotation);
    assertEquals(driver.rotation(), landscapeLeftRotation);
}
Also used : DeviceRotation(org.openqa.selenium.DeviceRotation) Test(org.junit.Test)

Example 3 with DeviceRotation

use of org.openqa.selenium.DeviceRotation in project java-client by appium.

the class XCUIAutomationTest method testLandscapeRightRotation.

@Test
public void testLandscapeRightRotation() {
    DeviceRotation landscapeRightRotation = new DeviceRotation(0, 0, 90);
    driver.rotate(landscapeRightRotation);
    assertEquals(driver.rotation(), landscapeRightRotation);
}
Also used : DeviceRotation(org.openqa.selenium.DeviceRotation) Test(org.junit.Test)

Example 4 with DeviceRotation

use of org.openqa.selenium.DeviceRotation in project java-client by appium.

the class UIAutomator2Test method testLandscapeLeftRotation.

@Test
public void testLandscapeLeftRotation() {
    DeviceRotation landscapeLeftRotation = new DeviceRotation(0, 0, 270);
    driver.rotate(landscapeLeftRotation);
    assertEquals(driver.rotation(), landscapeLeftRotation);
}
Also used : DeviceRotation(org.openqa.selenium.DeviceRotation) Test(org.junit.Test)

Example 5 with DeviceRotation

use of org.openqa.selenium.DeviceRotation in project java-client by appium.

the class UIAutomator2Test method testPortraitUpsideDown.

@Test
public void testPortraitUpsideDown() {
    DeviceRotation landscapeRightRotation = new DeviceRotation(0, 0, 180);
    driver.rotate(landscapeRightRotation);
    assertEquals(driver.rotation(), landscapeRightRotation);
}
Also used : DeviceRotation(org.openqa.selenium.DeviceRotation) Test(org.junit.Test)

Aggregations

DeviceRotation (org.openqa.selenium.DeviceRotation)6 Test (org.junit.Test)5 WebDriverException (org.openqa.selenium.WebDriverException)1 Response (org.openqa.selenium.remote.Response)1