【发布时间】:2014-07-23 17:02:46
【问题描述】:
我正在尝试自动化一个 android 应用程序,
我采用了以下代码,
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.android.AndroidDriver;
public class LaunchElGiftoAndroid {
public static void main(String args[])throws Exception
{
AndroidDriver ad=new AndroidDriver();
System.out.println("Started");
ad.get("http://www.gmail.com");
System.out.println("Application Title"+ ad.getTitle());
Thread.sleep(2000);
ad.findElement(By.name("Email")).sendKeys("testing");
ad.findElement(By.name("Passwd")).sendKeys("type password");
ad.findElement(By.name("signIn")).click();
System.out.println("Opened");
ad.close();
}
}
我已经正确安装了 Web 驱动 apk。
我遇到了以下导入语句的问题。
导入 org.openqa.selenium.android.AndroidDriver;
【问题讨论】: