Showing posts with label Appium desired capabilities. Show all posts
Showing posts with label Appium desired capabilities. Show all posts

Tuesday 6 July 2021

Automate Android , iOS, Windows UWP with Appium | Creating Desired Capabilities

Automating mobile apps

If you're interested in automating your web app in Mobile Safari on iOS or Chrome on Android, Appium can help you. Basically, you write a normal WebDriver test and use Appium as the Selenium server with a special set of desired capabilities.


Desired Capabilities are keys and values encoded in a JSON object, sent by Appium clients to the server when a new automation session is requested. They tell the Appium drivers all kinds of important things about how you want your test to work. Each Appium client builds capabilities in a way specific to the client's language, but at the end of the day, they are sent over to Appium as JSON objects.

Desired Capabilities can be scripted in the WebDriver test or set within the Appium Server GUI (via an Inspector Session)


Let’s consider an example of Desired Capabilities in Appium represented as a JSON object.

{
platformName”: Android”,
platformVersion”: 11.0”,
deviceName”: Samsung A50”,
automationName”: Appium”,
app”: path for the app under test
}
Using the above-mentioned Desired Capabilities, the user is instructing the drivers to start the test automation session for the app at the mentioned path on a Samsung A50 with Android version 11.0 using Appium.

In this video, we are going to create desired capabilities for Android, iOS, and Windows App. We are also going to see how to find the UDID of the iOS device and simulator. And how to find the bundle ID.




Thursday 18 October 2018

How to configure desired capabilities in Appium

What are desired Capabilities:

Desired capabilities are the set of information send to the Appium server whenever we are starting a new session.

They help us in defining the Version of the device,Version of the OS, the device which we are going to use,Application under test path and not limited too......


Below is the screenshot to create desired capabilities from Appium Desktop Interface 

















Here is the Sample example of the desired Capability for Appium
        

Usually I keep them in Config File

package utils;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import screens.android.HomePageAndroid;
import screens.android.LoginPageAndroid;
import screens.android.UserSettingAndroid;

public class CommonUtils {
DesiredCapabilities caps = new DesiredCapabilities();
public AppiumDriver<MobileElement> driver;
caps.setCapability("platformName", platformName);
        
caps.setCapability("deviceName", deviceName);
       
caps.setCapability("app", uri);
        
caps.setCapability("noReset", true);
        
URL remoteUrl = new URL("http://localhost:4723/wd/hub");
        
driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"),   caps);
        
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

}
}

Interview Experience with AMAZON for the role of Quality Assurance Tester

This role was for Digital/ IoT/Mobile Application based testing :)  Amazon is a dream company and everyone wants to work for that company a...

Popular Posts