Problems with Setting up First Android Test - Desired Capabilities

Hi,

Just want to firstly thank everyone for helping me (an utter novice) get to grips with Appium.

I have another question.

If my question make not sense at all please watch the video below

[https://www.dropbox.com/s/k1s8d2yfehmftxd/Desired%20Capabilities%20Capabilities.mp4?dl=0]

Basically I am writing my first test in appium java

I’ve added the external jars

Selenium Standalone server (I hope that’s correct!!)
Appium jars ( know that’s correct).

here is the code I’ve written so far:

package android_training;

import java.net.URL;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.android.AndroidDriver;

public class AndroidLaunch {

public static void main(String[] args) {

	
	DesiredCapabilities capabilities =new DesiredCapabilities();
	
	AndroidDriver driver=new AndroidDriver (new URL("http://0.0.0.0:4723/wd/hub"), desiredCapabilities);

Basically I am trying to define my capabilities class. I expect to see a dropdown list of all the capabilities available to me. But that isn’t happening (see the video)

What did I do wrong?

@fypnlp,

Please try to [Save -command+s, I meant] before typing capabilities on the new line.

on the 2nd line in IDE editor, please type capabilities. +[ctrl+space bar] (capabilities then type dot, then control + space bar) you will see all related methods/funtions related to DesiredCapabilities class like below.

@TuHuynh

Thank you so much.

Getting to grips has been such a challenge but thanks to awesome people like you (and so many others on the forum) make the process less daunting and stressful.

Thank you

1 Like