Native Browser Automation Using Appium 1.2.0.1 On Windows 7 Android Real Device: Could Not Find A Connected Android Device
I have looked many forums for this issue, there are quite a few answers on this topic but none of these have worked for me/match my criteria. I recently took up Mobile Automation t
Solution 1:
Please modify your code with the below one, hope so it works
DesiredCapabilitiescapabilities=newDesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName","sony xperia Z");
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("appPackage", "com.android.calculator2");
capabilities.setCapability("appActivity", "com.android.calculator2.Calculator");
driver = newAppiumDriver(newURL("http://127.0.0.1:4723/wd/hub"), capabilities);
Solution 2:
Try this code
DesiredCapabilitiescapabilities=newDesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
Change the Device_Name to "Android", this might work.
Solution 3:
In the deviceName field copy and paste the id given in the cmd window when you run the adb devies command.
Post a Comment for "Native Browser Automation Using Appium 1.2.0.1 On Windows 7 Android Real Device: Could Not Find A Connected Android Device"