appium / appium/java-client

Appium is launching app on Simulator but cannot execute any commands on android studio

Open
#1,199 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

User side problem/problem of an external tool
Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

The problem

none of my appium scripts are performing any action since I have reinstalled my windows. So far I have installed and configured every dependency required to my knowledge. Scripts are running fine without any issues. It's launching the app as well but couldn't perform the next action which is coded in the script and my Appium closes the session after waiting for the next action to perform

Environment

  • Appium version (Desktop Client): 1.9.1
  • Desktop OS/version used to run Appium: Windows 10
  • Mobile platform/version under test: Android emulator v 7.1

Link to Appium logs

https://gist.github.com/rachitgandhi/94b3829698964a74279c15473e433205

Code To Reproduce Issue [ Good To Have ]

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

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.AndroidMobileCapabilityType;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.remote.MobilePlatform;

public class Appi2 {

public static void main(String[] args) throws MalformedURLException {
	// TODO Auto-generated method stub
		
	
	DesiredCapabilities cap =new DesiredCapabilities();
	cap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);
	cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Demo");
	cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 25);
	cap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "io.appium.android.apis");
	cap.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "io.appium.android.apis.ApiDemos");
	AndroidDriver<AndroidElement> driver=new AndroidDriver(new URL ("http://127.0.0.1:4723/wd/hub"),cap);
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	

}

}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Appium logs and the Java reproduction code, then verify the reported setup with Appium 1.9.1, Windows 10, and an Android 7.1 emulator. Determine why the session stops before the next command and document a reproducible fix or the precise missing configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.