Comments (4)
See the getting started here:https://github.com/RobotiumTech/robotium/wiki/Getting-Started
this may resolve your problem:
public void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
from robotium.
DeliveryActivity extends Fragment.
public void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
java.lang.RuntimeException: Could not launch activity
from robotium.
public NewRobotiumTest() {
super(PACKAGE_NAME, Class.forName(LAUNCHER_ACTIVITY_CLASSNAME););
}
the first parameter is package name; second is launched activity
from robotium.
Thanks. Problem solved with code:
public class DeliveryActivityTest extends ActivityInstrumentationTestCase2 {
private static final String LAUNCHER_ACTIVITY_CLASSNAME = "com.delivery.example";
private static Class<?> launchActivityClass;
static {
try {
launchActivityClass = Class.forName(LAUNCHER_ACTIVITY_CLASSNAME);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
private Solo solo;
public DeliveryActivityTest(Class<DeliveryActivity> activityClass) {
super(activityClass);
}
public void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
public void tearDown() throws Exception {
solo.finishOpenedActivities();
super.tearDown();
}
@SuppressWarnings("unchecked")
public DeliveryActivityTest() {
super((Class<DeliveryActivity>) launchActivityClass);
}
public void testButton()
{
solo.clickOnText("Some button");
}
}
from robotium.
Related Issues (20)
- update repository description URL
- Build error with JavaCompile.setDependencyCacheDir() HOT 4
- Recording failed; Build failed with an exception HOT 3
- Links to PDF tutorials are broken
- ClickOnScreen Not working
- ClickOnwebElement not working
- Build failed: Could not find :ExecutorLibrary: HOT 3
- Is Robotium dead? HOT 4
- CLick on TwoWayView, Viewpager
- robotium typetext wrong order HOT 2
- Cannot find Activity class on Android7.0 HOT 1
- Can't open Javadoc HOT 1
- assertFalse does not work on Android Oreo 8.1 HOT 1
- [QUESTION] Where I can find the CI service?
- Robotium Recorder : Please install a compatible Android API level (15 or higher) HOT 2
- Image validation in mobile native app HOT 2
- Robotium to work with targetSdkVersion 30
- Could not find manifest file within jar
- Could find http://recorder.robotium.com/updates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotium.