Open GoogleCodeExporter opened 8 years ago
Hi all! I'm trying to write test demo NativeDriver?, but when i build, it have on error. This is my code: package com.google.android.testing.nativedriver.simplelayouts.test; import com.google.android.testing.nativedriver.client.AndroidNativeDriver; import com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import junit.framework.*; public class TestNativeApps extends TestCase { private AndroidNativeDriver driver; @Override protected void setUp() { driver = getDriver(); } @Override protected void tearDown() { driver.quit(); } protected AndroidNativeDriver getDriver() { return new AndroidNativeDriverBuilder() .withDefaultServer() .build(); } public void testTextValue() { driver.startActivity("com.google.android.testing.nativedriver.simplelayouts.TextValueActivity"); WebElement textView = driver.findElement(By.id("TextView01")); assertEquals("Hello, Android NativeDriver!", textView.getText()); WebElement textEditView = driver.findElement(By.id("EditText01")); textEditView.clear(); textEditView.sendKeys("this is some input"); assertEquals("this is some input", textEditView.getText()); } } And this is error: [2011-09-21 16:23:57 - BBBB] Android Launch! [2011-09-21 16:23:57 - BBBB] adb is running normally. [2011-09-21 16:23:57 - BBBB] Performing android.test.InstrumentationTestRunner JUnit launch [2011-09-21 16:23:57 - BBBB] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'duy' [2011-09-21 16:23:57 - BBBB] Uploading BBBB.apk onto device 'emulator-5554' [2011-09-21 16:24:02 - BBBB] Installing BBBB.apk... [2011-09-21 16:24:13 - BBBB] Success! [2011-09-21 16:24:13 - BBBB] Project dependency found, installing: simplelayouts [2011-09-21 16:24:15 - simplelayouts] Application already deployed. No need to reinstall. [2011-09-21 16:24:15 - BBBB] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554 [2011-09-21 16:24:16 - BBBB] Collecting test information [2011-09-21 16:24:20 - BBBB] Test run failed: Instrumentation run failed due to 'java.lang.NoSuchMethodException' I don't fix an error. Please help me! Thanks and Regards, Duy
Original issue reported on code.google.com by duynguye...@gmail.com on 21 Sep 2011 at 9:28
duynguye...@gmail.com
Attachments:
Original issue reported on code.google.com by
duynguye...@gmail.com
on 21 Sep 2011 at 9:28Attachments: