Please browse to below url to see prerequisites for mobile test automation:
New android application run in appium:
Please visit below url to download apk file from Google play Store
Selendroid-test-app: https://mvnrepository.com/artifact/io.selendroid/selendroid-test-app
The path to APK file:
Download desired android application file from Google Play Store and save the desired location on the computer. We create a file object which represents the actual apk file on the disk. I placed my apk file in the folder '/home/jannat/apk/'.
// Path of the android application file (apk)
File appDir = new File("/home/jannat/apk");
// path with android application name
File app = new File(appDir, "selendroid-test-app-0.17.0.apk");
// An absolute local path to the APK file
capabilities.setCapability(“app”, app.getAbsolutePath());
Example:
Handle already installed an android application using appium:
We need to provide android application package name and activity name which help to open already installed application.
Please browse to below url to find android application package name and activity name.
// Java package of the tested Android app
capabilities.setCapability("appPackage", "io.selendroid.testapp");
// An activity name for the Android activity you want to run from your package.
capabilities.setCapability("appActivity", "io.selendroid.testapp.HomeScreenActivity");
Demo java program for selendroid-test-app
Demo java program for selendroid-test-app
import io.appium.java_client.android.AndroidDriver;
import java.io.File;
import java.io.InterruptedIOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
public class SimpleAppiumProgram {
private static AndroidDriver driver;
public static void main(String []arg) throws MalformedURLException, InterruptedException{
// Created object of DesiredCapabilities class.
DesiredCapabilities capabilities=new DesiredCapabilities();
// Set android deviceName desired capability. Set genymotion emulator name.
capabilities.setCapability("deviceName", "192.168.56.101:5555");
// Set android platformName desired capability. It's Android in our case here.
capabilities.setCapability("platformName", "Android");
// Set android VERSION desired capability. Set genymotion emulator OS version.
capabilities.setCapability(CapabilityType.VERSION, "6.0.0");
// Set BROWSER_NAME desired capability. It's Android in our case here.
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
// Java package of the tested Android app
capabilities.setCapability("appPackage", "io.selendroid.testapp");
// An activity name for the Android activity you want to run from your package.
capabilities.setCapability("appActivity", "io.selendroid.testapp.HomeScreenActivity");
driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
Thread.sleep(5000);
driver.findElement(By.id("io.selendroid.testapp:id/my_text_field")).sendKeys("Hiro Mia");
driver.findElement(By.id("io.selendroid.testapp:id/touchTest")).click();
driver.quit();
}
}
your blog is so useful for the those want to learn more and explore their knowledge keep on updating ..........
ReplyDeleteBest Training Institute in chennai
Thanks a lot for sharing
ReplyDeleteHaving good health is what most people out there wants but can not achieve. some people takes buy ibogaine online AND buy weed online to get it.
buy LSD online
ReplyDeleteBuy moonrock online
Buy fantanyl patches online
buy cocaine online
Bolivian Cocaine
Colombian Cocaine
Heroin
Mexican Cocaine
Afghan Kush
ReplyDeleteAK-47
buy weed online
AK-47 dank vape
painkiller
cocaine
Amnesia Haze
buy weed online
Afghan Kush
AK-47
buy weed online
painkiller
buy weed online
cocaine
Amnesia Haze
magnificentincense.com
ReplyDelete24K Monkey Classic Incense 10g
AK-47 – X10 / PREMIUM
Bizarro Incense
Buy Black Mamba Incense Online
Buy WTF Herbal Incense
Cloud9 Mad Hatter Incense
Crazy Monkey Incense
k2 spray on paper
k2 paper sheets
Klimax Potpourri 15xxx Coconut(10g)
Crazy Monkey Incense
Cloud9 Mad Hatter Incense
Buy Purple Diesel Incense Online
Buy Pure Fire Herbal Incense Online
Buy Kisha Cole Incense (11g) online
Buy KUSH HERBAL INCENSE online
Buy Mind Trip Incense Online
Buy Platinum XXX Herbal Incense online
buy Orange Platinum Caution 10G
Buy OMG HERBAL POTPOURRI 10G online
https://bestmjstrainsonline.com/
ReplyDeleteBuy Liquid Incense Cheap
Buy K2 E-Liquid online
Cheap Herbal incense
Buy K2 Infused paper spray online, order K2 Spray online +1 (925) 526-5453
https://bestmjstrainsonline.com/product/5-co2-cannabis-oil-cartridges/
Buy weed online - Weed for sale
ReplyDeleteOrder marijuana online - Buy weed online
Buy Hybrid Weed strain online
sativa weed for sale
Buy liquid incense cheap ,Incense for sale online offers ,Liquid Spice ,k2 chemical spray for sale , where to buy k2 near me ,K2 E-LIQUID. liquid k2 , k2 spice spray ,herbal incense for sale , Liquid Herbal Incense, cheap herbal incense , strong herbal incense for sale , Liquid k2 on paper , Liquid K2 , Legal High Incense , liquid herbal incense for sale, Order Strong Liquid Incense , Herbal Incense For Sale , Buy Vape Cartridges , Cheap K2 Spice , Legal Potpourri , Buy Herbal Incense Discrete , Legit Herbal Incense Website , Liquid Incense Overnight Delivery , Buy Potpourri With Credit Cards , buy herbal incense with debit card, , Where To Order Liquid Incense Online , Buy Liquid Incense With Bitcoin , Buy K2 Liquid Incense On Paper In USA , Strongest Incense In USA
ReplyDeleteGlock store
ReplyDeleteGlocks for sale
glock43 gen4 mos
glock 17 gen4
glock 17 gen5
glock 21 For Sale
glock 26
glock 17x
glock 42
glock 19 gen 5
glock 19 Mos Gen 5
glock 45 gen 4
glock 19 gen-3
magazine usa gen4
glock 43 For Sale
glock 34 gen 5
g17l-long-slide-9x19mm
Dispensary care is what many people lack in the interior areas of the world. Weed, can help you recover shortly. marijuana. people face a lot of health issues everyday without solution. Weed However, crack cocaine has always been a perfect remedy for ill health. Nevertheless, cocaine may also help.
ReplyDelete