开发者

how to get menu label in monkeyrunner.?

I want to get the menu list item开发者_C百科s from an android phone. Are there any methods in monkeyrunner to fetch this?


From the monkeyrunner description:

Functional testing: monkeyrunner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.
Regression testing - monkeyrunner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.

So i think, you can't fetch anything, but you can specify a "correct" screenshot and compare it automatically with an actual screenshot to make functional tests.

EDIT: However, you can let monkeyrunner "press" the menu-button via device.press(KEYCODE_MENU, DOWN_AND_UP), take a screenshot and compare it to another one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜