How to launch mobile browser

Hi all,

I am naive to Appium.

I have my Andriod Emulator setup. I wanted to try a simple google test in Mobile Browser(Default browser. I dont have Chrome Driver installed. I am concentrating on Mobile Browser only).

Can someone tell me basic script to launch Mobile Browser and navigate to google site.

Environment:
Windows 7,
Emulator,
Native Mobile Browser.

I tried the below code:

    DesiredCapabilities capabilities=new DesiredCapabilities();
    
    capabilities.setCapability("deviceName", "Testing");
    capabilities.setCapability("browserName", "Browser");
    capabilities.setCapability("platformName", "Android");
    
    AppiumDriver driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
    driver.get("http://www.google.com");
    Thread.sleep(10000);

Appium trying to launch the browser and throwing the below error.

info: [debug] Error: Did not get session redirect from Chromedriver

at null.<anonymous> (D:\softies\Programs\Appium\node_modules\appium\lib\devices\android\chromedriver.js:222:12)
at Request._callback (D:\softies\Programs\Appium\node_modules\appium\lib\devices\common.js:121:5)
at Request.self.callback (D:\softies\Programs\Appium\node_modules\appium\node_modules\request\request.js:121:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (D:\softies\Programs\Appium\node_modules\appium\node_modules\request\request.js:985:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (D:\softies\Programs\Appium\node_modules\appium\node_modules\request\request.js:936:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickDomainCallback (node.js:459:13)

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Did not get session redirect from Chromedriver)”,“origValue”:“Did not get session redirect from Chromedriver”},“sessionId”:null}
info: ← POST /wd/hub/session 500 39183.997 ms - 214

Hi, I would recommend you to install Chrome on emulator and play with it. Otherwise you will want to figure out what the app main activity for that native browser, what might be not that easy.
On the another hand, once you don’t have strict requirements to test on real device, you can open Chrome browser in device emulator mode and specify the device name and model. It is much faster than emulator.

I have a requirement to test my application on native mobile browser than Chrome Browser. Is there no support from Appium, to test application in native Mobile browser?

In some of their documentation, they have mentioned we can launch the native browser by setting “browserName” capability to “Browser”. But why appium is looking for Chrome Driver installed in mobile and if not present exiting the execution?

Am i missing anything here?