I am new to android and i want to run simple webpage load test on my android device using python. I have written a python to calculate the load time for each given webpage. i want to execute this on my android device for default browser and not on chrome and collect the time stamp in a file for 10 iterations.
Here is the program runs on my windows machine.
import urllib
from urllib.request import urlopen
import time
url = ["http://www.msn.com","http://www.cnn.com","http://www.google.com"]
for i in range(0,1):
for x in url:
nf = urlopen(x)
start = time.time()
page = nf.read()
end = time.time()
lt = (end - start)
print (x,round(lt,2))
nf.close()
Thank you