• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Programming Languages
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
  • Automation Tools and Different Tools
    • Web Automation
      • Selenium with Java
        • Selenium Basic
        • Selenium Advance
        • Selenium Realtime
        • Framework
        • Selenium Interview
        • Selenium Videos
        • Selenium with Docker
      • Selenium with Python
      • WebdriverIO
        • Selenium Webdriver C# Tutorial
      • Cypress
      • Playwright
    • TestNG
    • Cucumber
    • Mobile Automation
      • Appium
    • API Testing
      • Postman
      • Rest Assured
      • SOAPUI
    • testRigor
    • Katalon
    • TestProject
    • Serenity BDD
    • Gradle- Build Tool
    • RPA-UiPath
    • Protractor
    • Windows Automation
  • Automation For Manual Testers
  • Services
  • Online Training
  • Contact us
  • About me
  • Follow us
    • Linkedin
    • Facebook Group
    • Facebook Page
    • Instagram

Automation

Selenium WebDriver tutorial Step by Step

You are here: Home / Mobile Test Automation / How to run Appium/Selenium test android chrome browser

How to run Appium/Selenium test android chrome browser

November 22, 2015 by Mukesh Otwani 60 Comments

Appium-Tutorials

Recently I got a new requirement in my organization to execute all our Selenium test in Android and IOS devices.

We found so many tools Open source and Paid tools as well and we did POC on multiple tools.

Finally, we decided to go with Appium and we got the very good result as well.

Before moving further, I would suggest you go through Appium official site and try to explore the site as much you can.

Appium Official Site- http://appium.io/

 

 

If you are completely new to Mobile Automation then you must watch video which will describe you about Appium Introduction,

Different kind of Mobile application which Appium can support (Native, Hybrid, Mobile Web View)

 

 

 

 

You need to install a couple of things before working with Appium.In this post, I will mainly focus on Appium with Windows only.

Note- If you are working with MAC machine the configuration will change soon I will post the complete setup of Appium with Mac machine.

The thing you should have before working with Appium.

1-  Java

2- Eclipse

3- Selenium WebDriver Jar –  Above 3 can be done through this link.

4- Appium Java Client

5- Appium(Server)

6- NodeJS

7- Android SDK

8- PDANet in Machine and in mobile as well.

9- GenyMotion if planning for Virtual Devices or Real Device

10- Microsoft .net framework.

 

 

 

This list looks quite big but the setup is quite easy but time-consuming and once you are done with setup next time it will hardly take 2 min to start you Mobile test.

I have created a short video which will guide you how to do all setup after downloading and I will recommend you to use the same setting which I did in my system.

 

 

Actual Scenario –

In below program, Appium will start mobile chrome browser and will perform the actions based on the script that we have written.

In code, we will use Android version as well so you should be familiar with API Level of android version.

For example- Android 5.1.1 has API Level 22 and Android 6.0 has API Level 23 and so on.

I found a very nice article which talks about all Android Version History.

 

 

Finally run Appium/Selenium test in android chrome Browser

Complete Selenium program for Android Chrome Browser Execution

package demo;
 
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
 
public class StartChrome
{
 
 
@Test
public void test1() throws MalformedURLException{
 
// Create object of  DesiredCapabilities class and specify android platform
DesiredCapabilities capabilities=DesiredCapabilities.android();
 

// set the capability to execute test in chrome browser
 capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,BrowserType.CHROME);
 
// set the capability to execute our test in Android Platform
   capabilities.setCapability(MobileCapabilityType.PLATFORM,Platform.ANDROID);
 
// we need to define platform name
  capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");
 
// Set the device name as well (you can give any name)
 capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"my phone");

 // set the android version as well 
   capabilities.setCapability(MobileCapabilityType.VERSION,"5.0.1");
 
 // Create object of URL class and specify the appium server address
 URL url= new URL("http://127.0.0.1:4723/wd/hub");
 
// Create object of  AndroidDriver class and pass the url and capability that we created
 WebDriver driver = new AndroidDriver(url, capabilities);
 
// Open url
  driver.get("http://www.facebook.com");
 
 // print the title
  System.out.println("Title "+driver.getTitle());
 
// enter username
driver.findElement(By.name("email")).sendKeys("mukesh@gmail.com");
 
// enter password
      driver.findElement(By.name("pass")).sendKeys("mukesh_selenium");
 
// click on submit button
driver.findElement(By.id("u_0_5")).click();
 
// close the browser
driver.quit();
 
 
 
 
}
 
}

 

Hope you have enjoyed above article then please share with your friends and comment below with feedback and suggestion.

 

In next article, I will show you how you can test native application on android devices and trust me you will love it.

 

You can like our Facebook Page for more updates Learn Automation Page
Join our facebook group for any query Selenium Group Discussion

 

 

Filed Under: Mobile Test Automation Tagged With: Android Chrome Browser Execution

Reader Interactions

Comments

  1. priyanka says

    August 20, 2019 at 6:22 PM

    Hi Mukesh,

    I am getting the below error even after reinstallation of new JDK. I am using Eclipse IDE 2019 and java -12 version please help me to resolve this error.
    Error :java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver

    Reply
    • Mukesh Otwani says

      August 20, 2019 at 10:30 PM

      Hi Priyanka,

      Kindly use Java 8 instead of Java 12

      Reply
  2. Siddharth says

    August 19, 2019 at 3:57 PM

    Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unable to automate Chrome version because it is too old for this version of Chromedriver.
    Chrome version on the device: Chrome/76.0.3809.111

    Reply
    • Mukesh Otwani says

      August 20, 2019 at 10:07 AM

      Hi Siddharth,

      Match the ChromeDriver version to Device/emulator Webview version. Get chromedriver with respective device webview version from here https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
      Then Copy the ChromeDriver to Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
      Now everything should work fine. If still not working, proceed to set the below capability androidCapabilities.setCapability(“chromedriverExecutable”,”/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver.exe”);

      Reply
  3. pankaj singh says

    February 17, 2017 at 1:21 PM

    great work brother,,,,,as a beginner your website is really helpful in learning appium(all the tutorials videos and all) as i already have an good knowledge in selenium i dnt think its difficult in undrstandng code,,,,,,hope to see some new stuff from you in the future,,,keep up the awesome work.

    Reply
    • Mukesh Otwani says

      February 17, 2017 at 1:41 PM

      Thanks Pankaj…:)

      Reply
  4. Suhasini M says

    January 11, 2017 at 10:51 AM

    Hi Muskesh,
    Your videos on Appium was very helpful when I had to do a presentation on Appium. Thanks a lot 🙂

    Reply
    • Mukesh Otwani says

      January 11, 2017 at 11:09 AM

      Hi Suhasini,

      I’m glad to know that my videos helped you to accomplish your task.

      Reply
  5. komal says

    December 13, 2016 at 5:32 PM

    hi Mukesh your automation videos are really very helpful 🙂

    Reply
    • Mukesh Otwani says

      December 14, 2016 at 12:11 AM

      Thanks Komal. Keep visiting.

      Reply
  6. Mrinal says

    December 2, 2016 at 7:17 AM

    Hi Mukesh

    I want to learn appium

    Reply
    • Mukesh Otwani says

      December 6, 2016 at 12:09 PM

      Hi Mrinal,

      I will send details soon

      Reply
  7. Jema says

    November 28, 2016 at 1:43 PM

    Hi Mukesh, Greatings from Osaka. Thanks for you video tutorial, it’s almost half of the work I am suppose to do in my research….but please help me with this error….I just copied your codes and run on eclipse and give me the following error
    Error: Main method not found in class com.myproject.com.Chrome, please define the main method as:
    public static void main(String[] args)
    or a JavaFX application class must extend javafx.application.Application

    Reply
    • Mukesh Otwani says

      November 28, 2016 at 11:38 PM

      Hi Jema,

      I guess you have not added proper library and I would suggest you to run as testng which is the ideal way of running the test.

      Reply
  8. Nishant Kumar says

    October 23, 2016 at 4:11 PM

    Hello Mukesh,
    Nice tutorial I must say.
    In my organization its not allowed to enable the port to recognize the real devices on Laptop or PC.
    Kindly suggest an alternate best way.

    Thanks,
    Nishant

    Reply
    • Mukesh Otwani says

      October 25, 2016 at 2:02 PM

      Hi Nishant,

      ADB automatically will detect the port and will check.

      Reply
  9. Alok says

    September 13, 2016 at 10:47 PM

    i am facing one problem
    WebDriver driver =new AndroidDriver(url,capabilities);
    error showing :-
    The type org.openqa.selenium.remote.service.DriverService$Builder cannot be resolved. It is indirectly referenced from required .class files

    one suggestion is showing i tried this, please help me on this..

    thanks
    alok

    Reply
    • Mukesh Otwani says

      September 15, 2016 at 6:05 PM

      Hi Alok,

      What version of Java client you are using?

      Reply
  10. Alok says

    September 13, 2016 at 10:42 PM

    Hi Mukesh,

    These are really good tutorials , i am waiting for more on appium .

    Reply
    • Mukesh Otwani says

      September 15, 2016 at 6:00 PM

      Thanks Alok yes I am planning to put some more videos and post on this.

      Reply
  11. Swapnil says

    September 9, 2016 at 12:14 PM

    Hi,

    Please tell how to click chrome browser menu icon or tabs icon?

    The code
    WebElement clickMenu=driver1.findElement(By.id(“com.android.chrome:id/menu_button”));
    clickMenu.click();

    is not working.

    Reply
    • Mukesh Otwani says

      September 12, 2016 at 3:45 PM

      Hi Swapnil,

      try with this id menu_button

      Reply
  12. Rahul Khanduri says

    September 5, 2016 at 11:37 PM

    Hi Mukesh,

    I am facing issue while selecting an item from dropdown (Autosuggestion) using Appium as the UI Automator does not recognize the real time ones. Please suggestion how to do the same.

    Regards,
    Rahul

    Reply
    • Mukesh Otwani says

      September 7, 2016 at 11:55 PM

      Hi Rahul,

      You can use click methods only for auto suggestion as well.

      Reply
  13. Heidi Gibb says

    August 21, 2016 at 6:49 AM

    Hi Mukesh,

    Great tutorial thanks for taking the time.

    I am unable to run the code, can tell me where I am going wrong, Error in appium is :
    Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js –address 127.0.0.1 –port 4723 –browser-name Chrome –avd phoneTest –no-reset –platform-name Android –platform-version 19 –automation-name Appium –device-name “phoneTest” –log-no-color
    > info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
    > info: Appium REST http interface listener started on 127.0.0.1:4723
    > info: [debug] Non-default server args: {“address”:”127.0.0.1″,”noReset”:true,”logNoColors”:true,”avd”:”phoneTest”,”deviceName”:”phoneTest”,”platformName”:”Android”,”platformVersion”:”19″,”automationName”:”Appium”,”browserName”:”Chrome”}
    > info: Console LogLevel: debug
    > info: –> POST /wd/hub/session {“desiredCapabilities”:{“browserName”:”chrome”,”platformName”:”Android”,”version”:”6.0.1″,”deviceName”:”my phone”,”platform”:”ANDROID”}}
    > info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
    > info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : version, platform
    > info: Set mode: Proxying straight through to Chromedriver
    > info: [debug] Looks like we want chrome on android
    > info: [debug] Creating new appium session 069db517-486f-43ce-8ede-40cfb05920ed
    > info: [debug] Checking whether adb is present
    > info: [debug] Using adb from C:\Software\android-sdk-windows\platform-tools\adb.exe
    > info: [debug] Using fast reset? false
    > info: [debug] Preparing device for session
    > info: [debug] Not checking whether app is present since we are assuming it’s already on the device
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > info: [debug] Launching Emulator with AVD phoneTest, launchTimeout 120000ms and readyTimeout 120000ms
    > info: [debug] Checking whether emulator is present
    > info: [debug] Using emulator from C:\Software\android-sdk-windows\tools\emulator.exe
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > error: Unable to start Emulator: The memory needed by this VM exceeds the driver limit.
    >
    > error: Unable to start Emulator: qemu-system-i386.exe: -drive if=none,index=0,id=system,file=C:\Software\android-sdk-windows/system-images\android-21\google_apis\x86\/sys
    > error: Unable to start Emulator: tem.img
    > error: Unable to start Emulator: : could not open disk image C:\Software\android-sdk-windows/system-images\android-21\google_apis\x86\/system.img: Could n
    > error: Unable to start Emulator: ot o
    > error: Unable to start Emulator: p
    > error: Unable to start Emulator: e
    > error: Unable to start Emulator: n
    > error: Unable to start Emulator:
    > error: Unable to start Emulator: ‘
    > error: Unable to start Emulator: C
    > error: Unable to start Emulator: :
    > error: Unable to start Emulator: \
    > error: Unable to start Emulator: S
    > error: Unable to start Emulator: o
    > error: Unable to start Emulator: f
    > error: Unable to start Emulator: t
    > error: Unable to start Emulator: w
    > error: Unable to start Emulator: a
    > error: Unable to start Emulator: r
    > error: Unable to start Emulator: e\android-sdk-windows/
    > error: Unable to start Emulator: syst
    > error: Unable to start Emulator: e
    > error: Unable to start Emulator: m
    > error: Unable to start Emulator: –
    > error: Unable to start Emulator: i
    > error: Unable to start Emulator: m
    > error: Unable to start Emulator: a
    > error: Unable to start Emulator: g
    > error: Unable to start Emulator: e
    > error: Unable to start Emulator: s
    > error: Unable to start Emulator: \android-21\google_apis\x86\/system
    > error: Unable to start Emulator: .im
    > error: Unable to start Emulator: g
    > error: Unable to start Emulator: ‘
    > error: Unable to start Emulator: :
    > error: Unable to start Emulator: Invalid argument
    >
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > info: [debug] Trying to find phoneTest emulator
    > info: [debug] Getting connected emulators
    > info: [debug] Getting connected devices…
    > info: [debug] executing cmd: C:\Software\android-sdk-windows\platform-tools\adb.exe devices
    > info: [debug] 2 device(s) connected
    > info: [debug] 1 emulator(s) connected
    > info: [debug] Sending telnet command to device: avd name
    > info: [debug] Getting running emulator port
    > info: [debug] Socket connection to device created
    > info: [debug] Socket connection to device ready
    > info: [debug] Telnet command got response: a[K[Dav[K[D[Davd[K[D[D[Davd [K[D[D[D[Davd n[K[D[D[D[D[Davd na[K[D[D[D[D[D[Davd nam[K[D[D[D[D[D[D[Davd name[K
    > phoneTest
    > info: [debug] Emulator phoneTest not running
    > Killed Node Server.
    > Appium server process ended

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 11:31 PM

      Hi Heidi,

      Kindly provide the code as well to fix this issue.

      Reply
      • Heidi Goosen says

        August 28, 2016 at 1:52 PM

        Ive been playing around.. here is my code and errors, really appreciate your help:

        CODE:
        package TestNGOnePack;
        import org.openqa.selenium.WebDriver;
        import org.openqa.selenium.firefox.FirefoxDriver;
        import org.testng.annotations.AfterMethod;
        import org.testng.annotations.BeforeMethod;
        import org.testng.annotations.Test;

        public class ClassOne {

        WebDriver driver = new FirefoxDriver();

        //@BeforeMethod defines this method has to run before every @Test methods
        @BeforeMethod
        public void openbrowser() {
        driver.manage().window().maximize();
        driver.get(“http://only-testing-blog.blogspot.in/2013/11/new-test.html”);
        }

        //@AfterMethod defines this method has to run after every @Test methods
        @AfterMethod
        public void closebrowser() {
        System.out.print(“\nBrowser close”);
        driver.quit();
        }

        @Test
        public void testmethodone() {
        String title = driver.getTitle();
        System.out.print(“Current page title is : “+title);
        System.out.print(“\n’TestNGOne -> TestNGOnePack -> ClassOne -> testmethodone’ has been executed successfully”);
        }
        }

        // ==========================================//
        // ==========================================//
        // ==========================================//

        ERROR:
        org.testng.TestNGException:
        Cannot instantiate class TestNGOnePack.ClassOne
        at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:40)
        at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:377)
        at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:290)
        at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:126)
        at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:191)
        at org.testng.internal.TestNGClassFinder.(TestNGClassFinder.java:130)
        at org.testng.TestRunner.initMethods(TestRunner.java:392)
        at org.testng.TestRunner.init(TestRunner.java:247)
        at org.testng.TestRunner.init(TestRunner.java:217)
        at org.testng.TestRunner.(TestRunner.java:169)
        at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:28)
        at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:61)
        at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:594)
        at org.testng.SuiteRunner.init(SuiteRunner.java:168)
        at org.testng.SuiteRunner.(SuiteRunner.java:117)
        at org.testng.TestNG.createSuiteRunner(TestNG.java:1339)
        at org.testng.TestNG.createSuiteRunners(TestNG.java:1326)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1180)
        at org.testng.TestNG.runSuites(TestNG.java:1104)
        at org.testng.TestNG.run(TestNG.java:1076)
        at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)
        Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
        … 22 more
        Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
        at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
        at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
        at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:38)
        at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:91)
        at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
        at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:245)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:220)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:215)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:211)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:124)
        at TestNGOnePack.ClassOne.(ClassOne.java:10)
        … 27 more

        Reply
        • Mukesh Otwani says

          September 8, 2016 at 1:33 AM

          Hi Heidi,

          Keep WebDriver driver = new FirefoxDriver(); inside method only

          Reply
  14. Harsh Arora says

    July 15, 2016 at 11:09 AM

    Hi Mukesh,

    Thanks for all videos and code.

    I am facing errors while running the code and i am not able to run it on real device pls help me .
    Thanks

    Reply
    • Mukesh Otwani says

      July 20, 2016 at 2:18 PM

      Hi Harsh,

      What issues you are facing?

      Reply
  15. Harsh Arora says

    July 14, 2016 at 5:29 PM

    Hi Mukesh,

    your videos and code are very useful, Thanks for all.
    But i am facing the same error as said by Adityah Saini above, I am getting all these errors and exception, not able to run the code on Real device.

    Exception in thread “main” java.lang.NoClassDefFoundError: com/google/common/collect/Iterables
    at org.openqa.selenium.net.NetworkInterface.(NetworkInterface.java:45)
    at org.openqa.selenium.net.NetworkInterface.(NetworkInterface.java:39)
    at org.openqa.selenium.net.DefaultNetworkInterfaceProvider.createInterface(DefaultNetworkInterfaceProvider.java:76)
    at org.openqa.selenium.net.DefaultNetworkInterfaceProvider.(DefaultNetworkInterfaceProvider.java:52)
    at org.openqa.selenium.net.NetworkUtils.getNetWorkDiags(NetworkUtils.java:181)
    at org.openqa.selenium.net.NetworkUtils.main(NetworkUtils.java:220)
    Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Iterables
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    … 6 more
    Please help me.

    Thanks .

    Reply
    • Mukesh Otwani says

      July 20, 2016 at 2:23 PM

      Hi Harsh,

      Seems all jars are not updated. Kindly check the jars too.

      Reply
  16. sudhr says

    July 14, 2016 at 1:08 PM

    hi
    iam geeting an errorl ike
    the version of this browser not supported for microsoftwebdriver

    Reply
    • Mukesh Otwani says

      July 14, 2016 at 1:51 PM

      You can skip this part 🙂 it will work

      Reply
  17. Adityah Saini says

    June 9, 2016 at 9:07 PM

    Hello Mukesh,
    I am experiencing the error of when I launch Appium and run the program. I run this program on the real device connected to the USB. Unfortunately, my development environment gives back the error: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: The desired capabilities should not include both an app and a browser (WARNING: The server did not provide any stacktrace information).
    If you could lend your help I would give much appreciation.

    Reply
    • Mukesh Otwani says

      June 14, 2016 at 9:18 PM

      Hi Adityah,

      Kindly use either browser name or app. I have used Browser in this exmaple. Are you running on browser or testing native app?

      Reply
      • bhargav says

        August 3, 2016 at 11:09 AM

        Update your appium chromedriver to latest version, it will resolve this issue.

        for more info visit this section: https://github.com/appium/appium/issues/5616

        Reply
        • Mukesh Otwani says

          August 5, 2016 at 12:00 PM

          Thanks Bhargav

          Reply
  18. jagadeesh says

    June 8, 2016 at 5:48 PM

    I am getting the Below error in console while running the program..pls help

    A new session could not be created. (Original error: spawn “” ENOENT) (WARNING: The server did not provide any stacktrace information)

    Reply
    • Mukesh Otwani says

      June 9, 2016 at 1:50 AM

      Hi Jagadeesh,

      Use Appium 1.3.4 version.

      Reply
  19. Biswa says

    April 4, 2016 at 2:22 PM

    Hi Mukesh,

    It would be great if u share session on IOS apps with appium.
    Waiting for your response.

    Reply
    • Mukesh Otwani says

      April 4, 2016 at 11:44 PM

      Hi Biswa,

      for IOS mac machine is required which I don’t have.

      Reply
  20. Sudheer says

    April 2, 2016 at 2:04 AM

    Hello Mukesh,
    Your videos are really really good. Could you please videos on Appium with Mac machine id you get a chance to try with that.

    Thanks

    Reply
    • Mukesh Otwani says

      April 4, 2016 at 11:53 PM

      Hi Sudheer,

      I dont have mac machine so cant post 🙁

      Reply
  21. Maverick says

    March 23, 2016 at 9:39 AM

    Hi Mukesk,
    Recently came across these videos and love it, can you please post some videos on testing native apps in android and IOS.

    Reply
    • Mukesh Otwani says

      March 26, 2016 at 2:00 PM

      Hi Maverick,

      Yes videos in the pipeline will upload soon.

      Reply
  22. Sampath says

    March 18, 2016 at 12:30 PM

    How to handle Hybrid apps in Android using Appium on real device
    Means how to switch from native app to Webview.

    Reply
    • Mukesh Otwani says

      March 18, 2016 at 5:40 PM

      Hi Sampath,

      Try below code

      Set contextWindows = driver.getContextHandles();
      for (String contexts : contextWindows) {
      System.out.println(contexts);
      if (contexts.contains(“WEBVIEW_1”)) {
      driver.context(contexts);
      }
      }

      Reply
  23. sureshjada says

    March 11, 2016 at 5:22 PM

    Hi Mukesh,
    I am using junit for ex assertion failure how to continue execution in selenium? but testng softassertion using but junit any option ?

    Reply
    • Mukesh Otwani says

      March 13, 2016 at 12:04 PM

      will post soon.

      Reply
  24. Yalaguresh says

    March 10, 2016 at 9:16 PM

    Can you upload any frame work videos please

    Reply
    • Mukesh Otwani says

      March 11, 2016 at 5:12 PM

      Yes will upload soon.

      Reply
  25. sureshjada says

    January 29, 2016 at 7:43 PM

    Hi Mukesh,

    I have one doute , I am trying to automate videos in android, but how to video is buffering and loading time ,forward particular time how to automate ?

    Please share the code

    Thanks
    Suresh J

    Reply
    • Mukesh Otwani says

      March 3, 2016 at 4:28 PM

      Hi Suresh,

      No idea for android videos I have tried with Youtube normal video.

      Please check below link it might help you

      http://learn-automation.com/flash-testing-with-selenium-webdriver-selenium-tutorials/

      Reply
  26. shiva gangwar says

    December 11, 2015 at 1:06 PM

    thank u sir for this post…….can u plz help me in android app testing like whatsapp………

    Reply
    • Mukesh Otwani says

      December 12, 2015 at 3:52 PM

      Hi Shiva,

      I will upload video in this weekend with code and trust me you will enjoy the session 🙂

      Happy weekend

      Reply
  27. Raja says

    November 23, 2015 at 3:10 PM

    Thank you dude!

    Reply
    • Mukesh Otwani says

      November 23, 2015 at 9:32 PM

      Thanks Raja 🙂

      Reply
  28. rama says

    November 22, 2015 at 11:55 PM

    thnks for this post

    Reply
    • Mukesh Otwani says

      November 23, 2015 at 3:15 AM

      Thanks Rama 🙂 Keep visiting

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Free Selenium Videos

https://www.youtube.com/watch?v=w_iPCT1ETO4

Search topic

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?

Stay connected via Facebook

Stay connected via Facebook

Archives

Footer

Categories

Recent Post

  • API Testing Using Postman And RestAssured
  • Disable Personalise Your Web Experience Microsoft Edge Prompt In Selenium
  • How To Fix Error: No tests found In Playwright
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Best and easy way to Group test cases in selenium

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?