How to Open Chrome Browser on android real device using selenium webdriver ?

391 views
Skip to first unread message

Shekhar Swami

unread,
Aug 26, 2013, 8:24:07 AM8/26/13
to seleniu...@googlegroups.com
Hi,
 i am trying to open chrome browser on android device using selenium webdriver. I am able to open default AndroidBrowser on my real device, but i don't know how to open chrome(on Android device) . Please reply if anyone knows.

Krishnan Mahadevan

unread,
Aug 26, 2013, 10:09:57 AM8/26/13
to Selenium Users
I dont think you can do it using AndroidDriver. You may want to take a look at Selendroid and see if that solves your purpose

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Mon, Aug 26, 2013 at 5:54 PM, Shekhar Swami <swam...@gmail.com> wrote:
Hi,
 i am trying to open chrome browser on android device using selenium webdriver. I am able to open default AndroidBrowser on my real device, but i don't know how to open chrome(on Android device) . Please reply if anyone knows.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2407c6e6-2981-44f8-b958-a40299834819%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mat Di

unread,
Oct 18, 2015, 11:21:58 PM10/18/15
to Selenium Users
Hi I'm using selenium.net with Appium and Chrome browser opens fine.

Get a copy of Appium and start it. Then in my C# project is like this:


using System;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
using System.Diagnostics;
using OpenQA.Selenium.Support.UI;

namespace seleniumdotnet
{
    class Program
    {
        public static IWebDriver driver;

        public static Stopwatch miCrono = new Stopwatch();
        static void Main(string[] args)
        {
            // # Parámetros de la conexión al servidor
            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.SetCapability("appWaitActivity", null);
            capabilities.SetCapability("device", "Android");
            //capabilities.SetCapability(CapabilityType.Platform, "Windows");
            capabilities.SetCapability("deviceName", "sg4");
            capabilities.SetCapability("platformName", "Android");
            capabilities.SetCapability("platformVersion", "4.3");
            capabilities.SetCapability("appPackage", "com.android.chrome");
            //capabilities.SetCapability("appActivity", "com.android.calculator2.Calculator");

            driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4723/wd/hub"),capabilities);
            driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 30));

}
}
}

When you create the instance, the chrome is opened in android device :)

of course you need the Selenium DotNet dll's in order to get it works   http://docs.seleniumhq.org/download/
Reply all
Reply to author
Forward
0 new messages