Unable to select date from calander

Hi…

I would be need your help in getting date selected from a specific kind of calendar … Here there is a calendar in which date, month and year is scrolable seperatly as you seen in the attached screen shot…

i use the below code only to select year for now, so it will swipe till the expected year will be display

But It scrolls only for the date even the xpath i defined for year only …

as
@FindBy(how = How.XPATH, using ="//android.widget.NumberPicker[@bounds=’[448,436][576,796]’ , and @index=‘2’]")
private WebElement date_yearlist;

List list = date_yearlist.findElements(By.className(“android.widget.Button”));

for(int i=0; i<list.size();i++)
{
System.out.println(“enter in to the loop”);
String date2="";
date2= list.get(i).getText();

			System.out.println(date2);

			if(date2.equals(expDateValue))
				{
				list.get(i).click();
				r1=true;
				System.out.println("if is working");
					break;
				}
			else

{
swipe up() ;//Method to swipe to up in the year list
}

please have look in to the attached screen shot …

@willosser
@slipy12
@Aleksei @crujzo

appreciate for your help… always…

Thank you…

what is Appium and java client versions?

in general (written as is - correct if misprinted):

@FindBy(classname = "android.widget.NumberPicker")
private List<WebElement> numberPicker;
function void setYear(int year)  {
 int preventLoop = 0;
 do {
  int currentYear;
  currentYear = Integer.parseInt(numberPicker.get(2).findElement(MobileBy.className( "android.widget.EditText")).getText()); //check classname
  if (currentYear > year) { // click down
    numberPicker.get(2).findElements(MobileBy.className( "android.widget.Button")).get(1).click();
  } else if (currentYear < year) { // click up
   numberPicker.get(2).findElements(MobileBy.className( "android.widget.Button")).get(0).click();
  } else { // we got it
    break;
  }
  preventLoop++;
 } while (preventLoop < 10); // 10 clicks to correct year. increase if not enough.
}

Hi @Aleksei … Thank you for your replay… i tried with above example you suggested… but its not working …the scrolling is not happening and remains stuck…

Iam using appium = 1.4
Java version : 4.1.2

int prevLoop =0;
do
{
int currentYear=0;
currentYear= Integer.parseInt(date_yearlist.get(2).findElement(MobileBy.className(“android.widget.EditText”)).getText());
int expYear = Integer.parseInt(this.expYear);
if(currentYear>expYear)
{
date_yearlist.get(2).findElements(MobileBy.className(“android.widget.Button”)).get(1).click();
System.out.println(“date year clicked”);
}
else if(currentYear<expYear)
{
date_yearlist.get(2).findElements(MobileBy.className(“android.widget.Button”)).get(0).click();
}
else
{
OK_button_toselectDate.click();
break;
}
prevLoop++;
}
while(prevLoop < 10);

}

Thanks

Does click on year below or above working on your view manually? If not you need swipe up/down instead.

Also does the code detecting correctly that it needed to increase or decrease year? Just add to log something into console.

ok… let me try it out… thank you @Aleksei …and one more issue which i haven’t ever faced that app is not executing continuously after once it launched … i defined the activity as per the dveloper recomdeded and its working sometimes and sometimed it doesn’t … if i restart the system some time it work … but not continuously… the app is launching and remain in the same login page and throw below message

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: com.fxxc/.apscreens.Splash never started. Current: com.fxx.xx/.apntopscreens.Login) (WARNING: The server did not provide any stacktrace information)

iam not sure why its happening so… i tried with other activity . but that’s not at all working…

have you ever noticed this kind of issue … please let me know if the root case…

Thanks

Just add both activities into driver appWaitActivity = “activity1, activity2”

Hi @Aleksei
I tried as follow

cap.setCapability(“appPackage”, “com.bb.xss”);
cap.setCapability(“appActivity”, “com.bb.xss.ag.Splash”);
cap.setCapability(“app-wait-activity”, “com.bb.xss.ag.Login”);

but getting the same error…

let me know please how it supposed to be …

Thanks

Example:

capabilities.setCapability(MobileCapabilityType.APP, appDir.getAbsolutePath());
capabilities.setCapability("appWaitActivity", 
  "xx.xxxx.activity.xxxxxxActivity, " +
  "xx.xxxx.activity.xxxxActivity, " +
  "xx.xxxx.xxx.xx.xxxxActivity");

Hey @Aleksei

what is ‘app’ in appDir.getAbsolutePath()); … sorry… i didn’t get what actually this variable mean here…

app is APK file. and “appDir.getAbsolutePath()” is url where to find it. how you install app on phone?

if you testing app that is already installed on phone try to set only:

cap.setCapability(“appPackage”, “com.bb.xss”);
cap.setCapability(“appActivity”, “com.bb.xss.ag.Splash”);

or

cap.setCapability(“appPackage”, “com.bb.xss”);
cap.setCapability(“appActivity”, “com.bb.xss.ag.Login”);

Hi @Aleksei

I added 2 activity as you suggested as…

cap.setCapability(“appPackage”, “com.bb.xss”);
cap.setCapability(“appActivity”, “com.bb.xss.ag.Splash”);
cap.setCapability(“appActivity”, “com.bb.xss.ag.Login”);

but still getting the same error…

Ok. Then provide appium logs with debug level to see more.

Hi @Aleksei

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --log C:\Users\Umesh\Desktop\log.txt --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {“address”:“127.0.0.1”,“log”:“C:\Users\Umesh\Desktop\log.txt”,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“23”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: File LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.fi.kyc”,“appActivity”:“com.fi.kyc.agentopscreens.Splash”,“newCommandTimeout”:“100”,“appWaitActivity”:“com.fi.kyc.agentopscreens.Splash com.fi.kyc.agentopscreens.Login”,“autoDismissAlerts”:true,“takesScreenshot”:“true”,“platformName”:“Android”,“deviceName”:“2caaacb7”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_111)
warn: Converting cap takesScreenshot from string to boolean. This might cause unexpected behavior.
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : takesScreenshot
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 912f3e0a-1a6e-4ae2-981c-4b65368c683e
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_111
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\SDK\platform-tools\adb.exe
warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 2caaacb7
info: [debug] Setting device id to 2caaacb7
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 wait-for-device
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: Device API level is: 22
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn’t exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 install “C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.fi.kyc -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window”
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“/data/local/tmp”}
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
info: [debug] Getting device API level
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.fi.kyc/com.fi.kyc.agentopscreens.Splash”
info: [debug] Waiting for pkg “com.fi.kyc” and activity “com.fi.kyc.agentopscreens.Splash com.fi.kyc.agentopscreens.Login” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window windows”
error: com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 21.89
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login
info: [debug] Error: com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1314:12)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1258:7)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login)”,“origValue”:“com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login”},“sessionId”:null}
info: ← POST /wd/hub/session 500 26951.838 ms - 366
Killed Node Server.
Appium server process ended

error: com.fi.kyc/.agentopscreens.Splash com.fi.kyc.agentopscreens.Login never started. Current: com.fi.kyc/.agentopscreens.Login
info: [

update to Login.

Set ONLY
cap.setCapability(“appPackage”, “com.bb.xss”);
cap.setCapability(“appActivity”, “.agentopscreens.Login”);

And do not add wait activity

Hi @Aleksei
the app is not launching when i updated to cap.setCapability(“appActivity”, “.agentopscreens.Login”);

and app is launching when splash activity is there …

this is the error iam getting here

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --log C:\Users\Umesh\Desktop\log.txt --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {“address”:“127.0.0.1”,“log”:“C:\Users\Umesh\Desktop\log.txt”,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“23”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: File LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.fi.kyc”,“appActivity”:“com.fi.kyc.agentopscreens.Login”,“newCommandTimeout”:“100”,“autoDismissAlerts”:true,“takesScreenshot”:“true”,“platformName”:“Android”,“deviceName”:“2caaacb7”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_111)
warn: Converting cap takesScreenshot from string to boolean. This might cause unexpected behavior.
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : takesScreenshot
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 14f6a59b-60bd-4187-b458-f30603e8806b
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_111
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\SDK\platform-tools\adb.exe
warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 2caaacb7
info: [debug] Setting device id to 2caaacb7
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 wait-for-device
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: Device API level is: 22
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn’t exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 install “C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.fi.kyc -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “dumpsys window”
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“/data/local/tmp”}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
info: [debug] Getting device API level
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: [debug] executing cmd: D:\SDK\platform-tools\adb.exe -s 2caaacb7 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.fi.kyc/com.fi.kyc.agentopscreens.Login”
error: Permission to start activity denied.
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 1.048
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Permission to start activity denied.
info: [debug] Error: Permission to start activity denied.
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1151:19)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Permission to start activity denied.)”,“origValue”:“Permission to start activity denied.”},“sessionId”:null}
info: ← POST /wd/hub/session 500 4113.337 ms - 194

Android version is? 1.4.16 does not support new android versions! Use latest 1.6.4

Android version is 5.1.1 and iam using the same device for running other project and it was working fine…
would that be a unique case for specific app ?

no idea. sorry. latest version i worked much was 1.5.3. then migrated about half year ago to 1.6.X

@Aleksei… after un-installation and installation of appium, it got worked for continusly… but after 5 to 6 time, again it got failed as before…

Hi @Aleksei

I have another issue on sending value to the edit text box where the value is not entering somtimes and most of the time the edit box would be selected but text values is not passing at all… i haven’t observed this kind of issues before… i have attached screen shot for the same … please let me know if you have experienced this kind of issue… and any solution …

the value in the edit field is empty in the sense, i tried with clear method before sending values…

Thanks