Androidエミュレーターでテストケースを実行するために、以下のコーディングを試しました。以下のエラーメッセージがスローされます。
private WebDriver driver;`
private String baseUrl;
@BeforeSuite
public void setUp() throws Exception {
SelendroidConfiguration config = new SelendroidConfiguration();
config.addSupportedApp("selendroid-test-app-0.14.0.apk");
SelendroidLauncher selendroidServer = new SelendroidLauncher(config);
selendroidServer.launchSelendroid();
SelendroidCapabilities caps = new SelendroidCapabilities("io.selendroid.testapp:0.14.0");
driver = new SelendroidDriver(caps);
baseUrl = "https://www.google.co.in/";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Test
public void testUntitled() throws Exception {
System.out.println("Start Execution.........");
driver.get(baseUrl + "/");
driver.findElement(By.id("gbqfq")).sendKeys("Test");
driver.findElement(By.id("gbqfb")).click();
}
@AfterSuite
public void tearDown() throws Exception {
driver.quit();
}
スタックトレース
setUp(mobileweb.photocentric.SampleTest) Time elapsed: 0 sec <<< FAILURE!
org.openqa.selenium.SessionNotCreatedException: The requested application under test is not configured in selendroid server.
Command duration or timeout: 207 milliseconds
Driver info: io.selendroid.SelendroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
at io.selendroid.SelendroidDriver.<init>(SelendroidDriver.java:61)
at mobileweb.photocentric.ScrollArticleTest.setUp(ScrollArticleTest.java:25)
Caused by: org.openqa.selenium.SessionNotCreatedException: The requested application under test is not configured in selendroid server.