The use of the following test frameworks and test tools has been evaluated and tested. Other common frameworks and test tools are under evaluation. If you have any questions about using your preferred test tools, please feel free to
Selenium was created for automated Softwaretests of Web Applications. The Mobile Device Cloud supports the Selenium 3 and Selenium 4 Framework.
Several Selenium API compatible programming languages are available for developing your tests (Java, Ruby Phyton and Node).
Read more about Selenium on
import org.openqa.selenium.*;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.junit.jupiter.api.*;
import java.net.URL;
import java.time.Duration;
public class ExampleTest {
private static final String ACCESS_KEY = "YOUR_ACCESS_KEY_TO_THE_MOBILE_DEVICE_CLOUD";
private RemoteWebDriver driver;
private DesiredCapabilities dc = new DesiredCapabilities();
private final String TEST_NAME = "Selenium Quick Start Browser MDC-Demo";
@BeforeEach
public void setUp() throws Exception {
dc.setCapability("experitest:Call MMS Mobile Device Cloud", TEST_NAME);
dc.setCapability("experitest:accessKey", ACCESS_KEY);
dc.setCapability("experitest:testName", TEST_NAME);
driver = new RemoteWebDriver(new URL("https://mobiledevicecloud.t-systems-mms.eu/wd/hub"), dc);
dc.setCapability(CapabilityType.BROWSER_NAME, "safari");
}
@Test
public void browserMDCTest() throws InterruptedException {
driver.get("https://mobiledevice.cloud/");
new WebDriverWait(driver, Duration.ofSeconds(15)).until(ExpectedConditions.presenceOfElementLocated(By.id("devicecloud-layer-title")));
WebElement acceptCookie = driver.findElement(By.id("consentAcceptAll"));
acceptCookie.click();
}
@AfterEach
public void tearDown() {
System.out.println("Report URL: "+ driver.getCapabilities().getCapability("reportUrl"));
driver.quit();
}
}
1.
2.
3.
Write your Selenium test in your familiar programming language (The test "ExampleTest" was written in Java and TestNG for illustration).
Start your Selenium-Test.
You can view your test results in the reporting area of the Mobile Device Cloud.