testing-samples icon indicating copy to clipboard operation
testing-samples copied to clipboard

noway to get UiDevice out testcase?

Open ccsldya opened this issue 7 years ago • 1 comments

I notice UiDevice.getInstance() maked as "Deprecated", so how can I get UiDevice out test case Instrumentation? we want to implement our automate testing case , not using current testing framework. I googled a lot , thanks !

ccsldya avatar May 02 '18 10:05 ccsldya

I notice UiDevice.getInstance() maked as "Deprecated", so how can I get UiDevice out test case Instrumentation? we want to implement our automate testing case , not using current testing framework. I googled a lot , thanks !

You can use it like this:

UiDevice mDevice = UiDevice.getInstance(getInstrumentation())

EmotionalRonan avatar Aug 01 '20 02:08 EmotionalRonan