Comments (8)
The security exception that you get means that the test cases are trying to
interact
with an application that they are not allowed to interact with (e.g. another
application or the platform). This tells me that Note pad does not start when
your
test cases start to execute. One example when this can happen is when the
emulators
lock screen is active. Then the test cases try to interact with the lock screen
instead and therefore a security exception is thrown.
Can you please make sure that Note pad does indeed start when you select the
example
test project and click run application as Android JUnit Test. If it does not
start,
try to run Note pad separately by right clicking it and select run as Android
Application. If that is successfull then try to run the test cases again.
If this does not work then please get back to me with more information and
observations.
Original comment by [email protected]
on 22 Feb 2010 at 4:58
from robotium.
Thanks for your quick reply. You were correct. This error is occurring because
the
lock screen is active. If I unlock the emulator after it starts and then start
the
test, it will run.
Is there a solution so that I can run this as an automated test and not have to
manually go to the home screen?
Original comment by [email protected]
on 22 Feb 2010 at 5:24
from robotium.
Sorry, the above reply is from jaglassjr. I was signed into another account.
Original comment by [email protected]
on 22 Feb 2010 at 5:25
from robotium.
Once you have unlocked the emulator there is no need to go the home screen. Its
just
the first time when you start the emulator that you need to unlock it. Im sure
there
must be an adb command that you can send to the emulator in order to unlock it.
Try
looking at different adb commands and see if you find one that suites your
needs.
Original comment by [email protected]
on 22 Feb 2010 at 6:49
- Changed state: Invalid
from robotium.
U can do the following:
KeyguardManager km =
(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if (km.inKeyguardRestrictedInputMode())
{
KeyguardManager.KeyguardLock lock = km.newKeyguardLock("some_tag");
lock.disableKeyguard();
SystemClock.sleep(2000);
}
Original comment by [email protected]
on 13 Oct 2010 at 1:52
from robotium.
That's not a very good workaround; it requires adding that code to the
application under test and adding the android.permission.DISABLE_KEYGUARD
permission to your app.
This is described here:
http://developer.android.com/intl/fr/guide/topics/testing/testing_android.html#U
nlockDevice
Perhaps this is also useful for automatically unlocking the emulator:
http://bit.ly/cMrbEM
Original comment by [email protected]
on 13 Oct 2010 at 8:23
from robotium.
I am using SMS appliction in my project while testing through robotium when it
goes into SMS app it is not coming back to my applicion......if anyone knows
solution plz reply as soon as possible.
Original comment by [email protected]
on 18 Nov 2010 at 4:35
from robotium.
I have the same problem but I try to test UI with robotium.
Also I build project with gradle. When I worked with eclipse/IDEA(without
gradle) it worked fine.
Original comment by [email protected]
on 26 Feb 2014 at 9:10
from robotium.
Related Issues (20)
- Cannot take screenshot on some devices. HOT 1
- Cannot browse to JDK Home with official Sun JDK on Mac Osx 10.10.3 HOT 1
- ConcurrentModificationException when calling Solo.finishOpenedActivities HOT 9
- WaitForView using resource id doesn't return until timeout is reached, even when a match is found HOT 4
- xpath result contains only one html node HOT 1
- Robotium Recorder failing to launch app on mobile device HOT 3
- Cannot Run robotium tests after save HOT 5
- ActivityUtils.getCurrentActivity() fails when dialog-styled activities change orientation HOT 1
- Unable start new Recording HOT 6
- When using Solo.clickOnActionBarHomeButton, can't click on text on the NavigationDrawer HOT 8
- Solo waitForDialogToOpen() continues on shown toast message HOT 1
- Problems to setting date in date picker HOT 1
- clickOnActionBarItem(0x1) is not working. HOT 5
- How to generate the robotium test reports? HOT 2
- Not able to click on ImageView in the list view list item HOT 1
- clickontext dosen't work in listview and orientation of phone is landscape HOT 1
- Robotium 5.3.0 crash problem (ActivityMonitor thread?) HOT 3
- RobotiumWebClient cannot be cast to org.apache.cordova.engine.SystemWebChromeClient HOT 1
- images drawn on Canvas HOT 1
- Is it possible to do Android Robotium with JBehave White box automation using source project? HOT 1
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.