Home > Tricks & Tips > Connect to a specific device in Monkey script

Connect to a specific device in Monkey script


There are cases when you run many emulators in order to test their functions like sending messages, calling to each others …

and in Monkey scripts you need to connect to specific one.

Look at documentation on MonkeyRunner, you’ll see how to connect to a specific device:

Sample: if I want to connect to a device: “emulator-5556”, my connection part of script would be like:

device = MonkeyRunner.waitForConnection(120, "emulator-5556")

That’s all for it, now you can handle the rest of automation test for device.

Cheers,
Pete Houston

Advertisements
  1. skip
    June 6, 2013 at 6:44 pm

    but how to connect to device by IP_address?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: