CrashMonkey icon indicating copy to clipboard operation
CrashMonkey copied to clipboard

lock -> unlock doesn't work

Open rompic opened this issue 11 years ago • 2 comments

I have the impression, that the unlock mechanism doesn't work so my tests use to stop prematurely.:

2014-10-21 09:50:58 +0000 Debug: target.lockForDuration("2.00243217498064") 2014-10-21 09:51:01 +0000 Debug: target.springboard().mainWindow().scrollViews().firstWithPredicate("ANY elements.name == 'SlideToUnlock' OR ANY elements.name == 'SlideToSetup'").dragInsideWithOptions({endOffset:{x:0.90,y:0.90}}, duration:"0.5", startOffset:{x:0.10,y:0.90}}}) 2014-10-21 09:52:18 +0000 Stopped: Script was stopped by the user

Anyone experiencing similar issues?

rompic avatar Oct 21 '14 09:10 rompic

Yes I'm experiencing the same problem.

The device screen is locked by UIATarget.lockForDuration(). This method successfully locks the screen but fails to unlock it after the specified time has passed. Since CrashMonkey is using UI Automonkey, the following issue may be of interest: jonathanpenn/ui-auto-monkey#11

skrach avatar Feb 17 '15 14:02 skrach

The problem can be mitgiated by providing a custom json config which doesn't include the lock event. A sample config can be found in Pull Request #13

skrach avatar Feb 17 '15 15:02 skrach