Skip to content

App walker

MilleBo edited this page Apr 23, 2017 · 1 revision

App walker can be summarized as an "organized monkey". Default it will simply tap on everything inside your application but you can also configure it for special cases (like not pressing button, writing specific text inside a textbox, doing something every x seconds, etc).

How to run

Default settings

The first case is simply default settings without any activity or package

var appWalker = new AppWalker(new AppWalkerConfiguration());
appWalker.Start(new AndroidDevice(), "myPackage", "myActivity");

Cases

App walker have three different "cases" - tap, time and stop.

  • Tap: Intercept tap interactions and decide if we should tap on specific node
  • Time: Perform some kind of action every x second
  • Stop: Stop the app walker when x happen

Using cases

Here is an example with a tap and time cases

var appWalker = new AppWalker(new AppWalkerConfiguration(), new List<IAppWalkerInput>()
		{
			new TapAppWalkerInput(true, new List<TapCase>()
			{
				new FuncTapCase(new List<With>() { With.ContentDesc("LoginViewLogin_Button")},
				((device, node) =>
				{
					Debug.WriteLine("stop tapping of node");
					return false;
				}))
			})
		});
appWalker.Start(new AndroidDevice(), "package", "activity", new List<TimeCase>() { new FunTimeCase(1000, device => Debug.WriteLine("Time"))}, new List<StopCase>());
Clone this wiki locally