0

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

1 Answers1

0

You can use SL4A to run scripts on Android.

That said, your question is asking about using the default browser, but your code doesn't use any browser, so it's a bit unclear what you want.

Carl Smith
  • 3,025
  • 24
  • 36