Search code examples
androidbrowsermonkeyrunner

Browser Activity not working


I need to launch the browser in the device.

The android version is 4.1

The line below isn't working, It's written in monkeyrunner

device.startActivity( component='com.google.android.browser/.BrowserActivity', uri=url)

Solution

  • Try this:-

    PACKAGE = 'com.android.browser'
    ACTIVITY = '.BrowserActivity'
    COMPONENT = PACKAGE + "/" + ACTIVITY
    URI = 'www.google.com'
    device.startActivity(component=COMPONENT, uri=URI)