如何使用ANT构建执行Robotium

时间:2013-07-19 09:08:26

标签: robotium uiautomator

I am trying to run robotium using ANT build but it giving error : 

//The code to select the text using the robotium .

import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiScrollable;
import com.android.uiautomator.core.UiSelector;
import android.webkit.WebView;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import com.jayway.android.robotium.solo.Solo;

UiObject policy = new UiObject(new UiSelector().className(
        "android.widget.TextView").textContains(t_o_s));
policy.clickAndWaitForNewWindow();
solo.clickOnText("Privacy Policy");

-pre-compile:

compile:
    [javac] Compiling 6 source files to C:\eclipse\NewClientAutomation\bin\clas
es
    [javac] C:\eclipse\NewClientAutomation\src\com\android\test\ca\AhaTest.java
18: error: package com.jayway.android.robotium.solo does not exist
    [javac] import com.jayway.android.robotium.solo.Solo;
    [javac]                                        ^
    [javac] C:\eclipse\NewClientAutomation\src\com\android\test\ca\AhaTest.java
40: error: cannot find symbol
    [javac]     private Solo solo ;
    [javac]             ^
    [javac]   symbol:   class Solo
    [javac]   location: class AhaTest
    [javac] 2 errors

BUILD FAILED


Please provide me the solution. how to include robotium class into the ANT.

如何在ANT中配置构建路径以包含robotium .class文件。 我正在使用Uiautoamator截屏功能拍摄屏幕和puttin robotium solo类来选择web视图页面中的文本。我想使用ANT Build在uiautomator中使用robotium类。

0 个答案:

没有答案