Skip to content

Instantly share code, notes, and snippets.

@AaronMT
Created March 27, 2012 21:41
Show Gist options
  • Save AaronMT/2220613 to your computer and use it in GitHub Desktop.
Save AaronMT/2220613 to your computer and use it in GitHub Desktop.
Monkey Tab Populate
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import sys, csv
browsers = ['org.mozilla.fennec/.App']
def main():
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
#Start each browser activity with the provided URI
for run, browser in enumerate(browsers):
# Visit each site
for visit, site in enumerate(csv.reader(open(sys.argv[1]).readlines())):
# Start the activity with the provided site
device.startActivity(component=browser, uri=site[0])
if __name__ == "__main__":
main()
"http://google.com"
"http://facebook.com"
"http://youtube.com"
"http://yahoo.com"
"http://baidu.com"
"http://wikipedia.org"
"http://live.com"
"http://blogspot.com"
"http://qq.com"
"http://twitter.com"
"http://amazon.com"
"http://linkedin.com"
"http://google.co.in"
"http://taobao.com"
"http://yahoo.co.jp"
"http://sina.com.cn"
"http://msn.com"
"http://wordpress.com"
"http://google.com.hk"
"http://google.de"
"http://ebay.com"
"http://google.co.jp"
"http://yandex.ru"
"http://google.co.uk"
"http://weibo.com"
"http://google.fr"
"http://163.com"
"http://bing.com"
"http://googleusercontent.com"
"http://t.co"
"http://microsoft.com"
"http://apple.com"
"http://mail.ru"
"http://google.com.br"
"http://paypal.com"
"http://soso.com"
"http://google.it"
"http://tumblr.com"
"http://google.es"
"http://google.ru"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment