Skip to content

[Need Immediate Help] Script is getting terminated as soon as Page Object class is initialized while executing Test script through Eclipse for Android testing using Java+Eclipse+Maven+Appium+Emulator. #1515

@RSuyal

Description

@RSuyal

The problem

Script is getting terminated as soon as Page Object class is initialized while executing Test script through Eclipse.
Earlier every this was ok, only after once I used UiAutomator2 as Automation Name this issue started. Now I have again replaced Automation Name back to Appium but every time I initiate Page Object Class the program terminates and all test fails.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.21.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.21.0
  • Desktop OS/version used to run Appium: Windows 10
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Emulator
  • Appium CLI or Appium.app|exe: Appium.exe

Details

If I do do not initialize page object and directly access the page elements all is ok, just when I try to locate the elements using page factory then the test case cant pass trough the page object initialization line.

earlier same code was working not sure what's wrong with this appium now.
Have already reinstalled Appium Desktop as well but problem is still there.

Previous code which didn't had any issue in running is here: https://github.com/RSuyal/hybrid-framework-appium

Link to Appium logs

Create a GIST which is a paste of your full Appium logs, and link them here.
Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs!

Code To Reproduce Issue [ Good To Have ]

##Page object class code.

package pageobjects;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;

public class Calc {

AppiumDriver<MobileElement> ldriver;

public Calc(AppiumDriver<MobileElement> rdriver)
{
	ldriver=rdriver;
	PageFactory.initElements(new AppiumFieldDecorator(rdriver), this);
}	

@FindBy(id="com.google.android.calculator:id/digit_0")
@CacheLookup
MobileElement buttonNo0;

}

##Test Script

package testcases;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
import pageobjects.Calc;

public class Calc_TC extends base.BaseClass {

@Test
public void verifyClickFunctonality0to9(){
	Calc obj=new Calc(driver);
	
	driver.findElement(By.id("com.google.android.calculator:id/digit_0")).click();
	driver.findElement(By.id("com.google.android.calculator:id/digit_1")).click();
	driver.findElement(By.id("com.google.android.calculator:id/digit_2")).click();
	driver.findElement(By.id("com.google.android.calculator:id/digit_3")).click();
	
}

}

##Appium Server Logs:

[info] �[35m[HTTP]�[39m Waiting until the server is closed
[info] �[35m[HTTP]�[39m Received server close event
[info] �[35m[Appium]�[39m Welcome to Appium v1.21.0
[info] �[35m[Appium]�[39m Non-default server args:
[info] �[35m[Appium]�[39m sessionOverride: true
[info] �[35m[Appium]�[39m relaxedSecurityEnabled: true
[info] �[35m[Appium]�[39m allowInsecure: {
[info] �[35m[Appium]�[39m }
[info] �[35m[Appium]�[39m denyInsecure: {
[info] �[35m[Appium]�[39m }
[info] �[35m[Appium]�[39m Appium REST http interface listener started on 0.0.0.0:4723[debug] �[35m[HTTP]�[39m Request idempotency key: 530a83fe-5ae8-4735-a68d-ba11c2ec6834
[info] �[35m[HTTP]�[39m �[37m-->�[39m �[37mPOST�[39m �[37m/wd/hub/session�[39m
[info] �[35m[HTTP]�[39m �[90m{"desiredCapabilities":{"app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","platformVersion":"11.0","automationName":"Appium","autoGrantPermissions":true,"platformName":"Android","deviceName":"Android Emulator"},"capabilities":{"firstMatch":[{"appium:app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","appium:autoGrantPermissions":true,"appium:automationName":"Appium","appium:deviceName":"Android Emulator","platformName":"android","appium:platformVersion":"11.0"}]}}�[39m
[debug] �[35m[W3C]�[39m Calling AppiumDriver.createSession() with args: [{"app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","platformVersion":"11.0","automationName":"Appium","autoGrantPermissions":true,"platformName":"Android","deviceName":"Android Emulator"},null,{"firstMatch":[{"appium:app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","appium:autoGrantPermissions":true,"appium:automationName":"Appium","appium:deviceName":"Android Emulator","platformName":"android","appium:platformVersion":"11.0"}]}]
[debug] �[35m[BaseDriver]�[39m Event 'newSessionRequested' logged at 1632073933833 (23:22:13 GMT+0530 (India Standard Time))
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m ======================================================================
[warn] �[35m[Appium]�[39m DEPRECATION WARNING:
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m The 'automationName' capability was not provided in the desired
[warn] �[35m[Appium]�[39m capabilities for this Android session
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m Setting 'automationName=UiAutomator2' by default and using the
[warn] �[35m[Appium]�[39m UiAutomator2 Driver
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m The next major version of Appium (2.x) will require the
[warn] �[35m[Appium]�[39m 'automationName' capability to be set for all sessions on all
[warn] �[35m[Appium]�[39m platforms
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m In previous versions (Appium <= 1.13.x), the default was
[warn] �[35m[Appium]�[39m 'automationName=UiAutomator1'
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m If you wish to use that automation instead of UiAutomator2, please
[warn] �[35m[Appium]�[39m add 'automationName=UiAutomator1' to your desired capabilities
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m For more information about drivers, please visit
[warn] �[35m[Appium]�[39m http://appium.io/docs/en/about-appium/intro/ and explore the
[warn] �[35m[Appium]�[39m 'Drivers' menu
[warn] �[35m[Appium]�[39m
[warn] �[35m[Appium]�[39m ======================================================================
[warn] �[35m[Appium]�[39m
[info] �[35m[Appium]�[39m Appium v1.21.0 creating new AndroidUiautomator2Driver (v1.65.0) session
[debug] �[35m[Appium]�[39m There are no active sessions for cleanup
[info] �[35m[Appium]�[39m Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] �[35m[BaseDriver]�[39m W3C capabilities and MJSONWP desired capabilities were provided
[debug] �[35m[BaseDriver]�[39m Creating session with W3C capabilities: {
[debug] �[35m[BaseDriver]�[39m "alwaysMatch": {
[debug] �[35m[BaseDriver]�[39m "platformName": "android",
[debug] �[35m[BaseDriver]�[39m "appium:app": "D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk",
[debug] �[35m[BaseDriver]�[39m "appium:autoGrantPermissions": true,
[debug] �[35m[BaseDriver]�[39m "appium:automationName": "Appium",
[debug] �[35m[BaseDriver]�[39m "appium:deviceName": "Android Emulator",
[debug] �[35m[BaseDriver]�[39m "appium:platformVersion": "11.0"
[debug] �[35m[BaseDriver]�[39m },
[debug] �[35m[BaseDriver]�[39m "firstMatch": [
[debug] �[35m[BaseDriver]�[39m {}
[debug] �[35m[BaseDriver]�[39m ]
[debug] �[35m[BaseDriver]�[39m }
[info] �[35m[BaseDriver]�[39m Session created with session id: 8b96643d-2103-4058-862c-b5e2be18cf32
[info] �[35m[BaseDriver]�[39m Using local app 'D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk'
[debug] �[35m[UiAutomator2]�[39m Checking whether app is actually present
[info] �[35m[ADB]�[39m Using 'adb.exe' from 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'[info] �[35m[AndroidDriver]�[39m Retrieving device list
[debug] �[35m[ADB]�[39m Trying to find a connected android device
[debug] �[35m[ADB]�[39m Getting connected devices[debug] �[35m[ADB]�[39m Connected devices: [{"udid":"emulator-5554","state":"device"}]
[info] �[35m[AndroidDriver]�[39m Looking for a device with Android '11.0.0'
[debug] �[35m[ADB]�[39m Setting device id to emulator-5554
[info] �[35m[ADB]�[39m Getting device platform version
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] �[35m[ADB]�[39m Current device property 'ro.build.version.release': 11
[info] �[35m[AndroidDriver]�[39m Using device: emulator-5554
[info] �[35m[ADB]�[39m Using 'adb.exe' from 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'[debug] �[35m[ADB]�[39m Setting device id to emulator-5554
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] �[35m[ADB]�[39m Current device property 'ro.build.version.sdk': 30
[info] �[35m[ADB]�[39m Getting device platform version
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'[debug] �[35m[ADB]�[39m Current device property 'ro.build.version.release': 11
[debug] �[35m[ADB]�[39m Device API level: 30
[info] �[35m[UiAutomator2]�[39m Relaxing hidden api policy
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''[debug] �[35m[AndroidDriver]�[39m Parsing package and activity from app manifest
[info] �[35m[ADB]�[39m Package name: 'com.google.android.calculator'
[info] �[35m[ADB]�[39m Main activity name: 'com.android.calculator2.Calculator'
[debug] �[35m[AndroidDriver]�[39m Parsed package and activity are: com.google.android.calculator/com.android.calculator2.Calculator
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'[debug] �[35m[AndroidDriver]�[39m Pushing settings apk to device...
[debug] �[35m[ADB]�[39m Getting install status for io.appium.settings
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'[debug] �[35m[ADB]�[39m 'io.appium.settings' is installed
[debug] �[35m[ADB]�[39m Getting package info for 'io.appium.settings'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] �[35m[ADB]�[39m The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.3.0' >= '3.3.0')
[debug] �[35m[ADB]�[39m There is no need to install/upgrade 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] �[35m[ADB]�[39m Getting IDs of all 'io.appium.settings' processes
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)'
[debug] �[35m[AndroidDriver]�[39m io.appium.settings is already running. There is no need to reset its permissions.
[debug] �[35m[Logcat]�[39m Starting logs capture with command: C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 logcat -v threadtime[debug] �[35m[UiAutomator2]�[39m Forwarding UiAutomator2 Server port 6790 to local port 8200
[debug] �[35m[ADB]�[39m Forwarding system: 8200 to device: 6790
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'[info] �[35m[UiAutomator2]�[39m Server package at 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[info] �[35m[UiAutomator2]�[39m Server package at 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[debug] �[35m[ADB]�[39m Getting install status for io.appium.uiautomator2.server
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] �[35m[ADB]�[39m 'io.appium.uiautomator2.server' is installed
[debug] �[35m[ADB]�[39m Getting package info for 'io.appium.uiautomator2.server'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'[debug] �[35m[ADB]�[39m The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.21.1' >= '4.21.1')
[debug] �[35m[UiAutomator2]�[39m io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] �[35m[ADB]�[39m Checking app cert for C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-v4.21.1.apk
[info] �[35m[ADB]�[39m Using 'apksigner.jar' from 'C:\Users\rsuya\AppData\Local\Android\Sdk\build-tools\31.0.0\lib\apksigner.jar'
[debug] �[35m[ADB]�[39m Starting apksigner: 'C:\Program Files\Java\jdk1.8.0_291\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\rsuya\AppData\Local\Android\Sdk\build-tools\31.0.0\lib\apksigner.jar verify --print-certs C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-v4.21.1.apk[debug] �[35m[ADB]�[39m apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=[email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] �[35m[ADB]�[39m
[debug] �[35m[ADB]�[39m sha256 hash did match for 'appium-uiautomator2-server-v4.21.1.apk'
[info] �[35m[ADB]�[39m 'C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-v4.21.1.apk' is signed with the default certificate
[debug] �[35m[ADB]�[39m Getting install status for io.appium.uiautomator2.server.test
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
[debug] �[35m[ADB]�[39m 'io.appium.uiautomator2.server.test' is installed
[debug] �[35m[ADB]�[39m Checking app cert for C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-debug-androidTest.apk
[debug] �[35m[ADB]�[39m Starting apksigner: 'C:\Program Files\Java\jdk1.8.0_291\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\rsuya\AppData\Local\Android\Sdk\build-tools\31.0.0\lib\apksigner.jar verify --print-certs C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-debug-androidTest.apk[debug] �[35m[ADB]�[39m apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=[email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] �[35m[ADB]�[39m
[debug] �[35m[ADB]�[39m sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[info] �[35m[ADB]�[39m 'C:\Users\rsuya\AppData\Local\Temp\2021819-15440-phs70i.p7ehl\appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[info] �[35m[UiAutomator2]�[39m Server packages are not going to be (re)installed
[debug] �[35m[UiAutomator2]�[39m Waiting up to 30000ms for services to be available
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] �[35m[UiAutomator2]�[39m Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[info] �[35m[ADB]�[39m Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[debug] �[35m[ADB]�[39m Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'[debug] �[35m[ADB]�[39m Checking app cert for D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk
[debug] �[35m[ADB]�[39m Starting apksigner: 'C:\Program Files\Java\jdk1.8.0_291\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\rsuya\AppData\Local\Android\Sdk\build-tools\31.0.0\lib\apksigner.jar verify --print-certs D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk[debug] �[35m[ADB]�[39m apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=[email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] �[35m[ADB]�[39m Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] �[35m[ADB]�[39m
[debug] �[35m[ADB]�[39m sha256 hash did match for 'Calculator.apk'
[info] �[35m[ADB]�[39m 'D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk' is signed with the default certificate
[debug] �[35m[ADB]�[39m Getting install status for com.google.android.calculator
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.google.android.calculator'
[debug] �[35m[ADB]�[39m 'com.google.android.calculator' is installed
[debug] �[35m[ADB]�[39m Getting package info for 'com.google.android.calculator'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.google.android.calculator'[debug] �[35m[ADB]�[39m The version name of the installed 'com.google.android.calculator' is greater or equal to the application version name ('7.8.0' >= '7.8.0')
[debug] �[35m[ADB]�[39m There is no need to install/upgrade 'D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk'
[info] �[35m[AndroidDriver]�[39m Performing fast reset on 'com.google.android.calculator'
[debug] �[35m[ADB]�[39m Getting install status for com.google.android.calculator
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.google.android.calculator'[debug] �[35m[ADB]�[39m 'com.google.android.calculator' is installed
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop com.google.android.calculator'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm clear com.google.android.calculator'[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.google.android.calculator'[debug] �[35m[ADB]�[39m Retrieving requested permissions
[debug] �[35m[ADB]�[39m Retrieved 8 permissions from requested group
[debug] �[35m[ADB]�[39m Retrieving granted permissions
[debug] �[35m[ADB]�[39m Retrieved 4 permissions from install,runtime groups
[info] �[35m[ADB]�[39m com.google.android.calculator contains no permissions available for granting
[debug] �[35m[AndroidDriver]�[39m Performed fast reset on the installed 'com.google.android.calculator' application (stop and clear)
[debug] �[35m[UiAutomator2]�[39m Performing shallow cleanup of automation leftovers
[debug] �[35m[UiAutomator2]�[39m No obsolete sessions have been detected (socket hang up)
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[info] �[35m[UiAutomator2]�[39m Starting UIAutomator2 server 4.21.1
[info] �[35m[UiAutomator2]�[39m Using UIAutomator2 server from 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk' and test from 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[info] �[35m[UiAutomator2]�[39m Waiting up to 30000ms for UiAutomator2 to be online...
[debug] �[35m[ADB]�[39m Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] �[35m[WD Proxy]�[39m Matched '/status' to command name 'getStatus'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] �[35m[WD Proxy]�[39m socket hang up[debug] �[35m[Instrumentation]�[39m io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:[debug] �[35m[WD Proxy]�[39m Matched '/status' to command name 'getStatus'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] �[35m[WD Proxy]�[39m socket hang up[debug] �[35m[WD Proxy]�[39m Matched '/status' to command name 'getStatus'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] �[35m[UiAutomator2]�[39m The initialization of the instrumentation process took 2113ms
[debug] �[35m[WD Proxy]�[39m Matched '/session' to command name 'createSession'
[debug] �[35m[WD Proxy]�[39m Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"Android Emulator","platformVersion":"11.0"},"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"emulator-5554","platformVersion":"11.0","deviceUDID":"emulator-5554","appPackage":"com.google.android.calculator"}],"alwaysMatch":{}}}
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"Android Emulator","platformVersion":"11.0"},"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"emulator-5554","platformVersion":"11.0","deviceUDID":"emulator-5554","appPackage":"com.google.android.calculator"}],"alwaysMatch":{}},"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c"}}
[info] �[35m[WD Proxy]�[39m Determined the downstream protocol as 'W3C'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c/appium/device/info] with no body
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":{"androidId":"ee9035fa018d88ad","apiVersion":"30","bluetooth":{"state":"ON"},"brand":"google","carrierName":"Android","displayDensity":440,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone_x86_64","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":30000,"linkUpstreamBandwidthKbps":15000,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":13,"subtypeName":"LTE","type":0,"typeName...
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window'[info] �[35m[AndroidDriver]�[39m Screen already unlocked, doing nothing
[info] �[35m[UiAutomator2]�[39m Starting 'com.google.android.calculator/com.android.calculator2.Calculator and waiting for 'com.google.android.calculator/com.android.calculator2.Calculator'
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.google.android.calculator/com.android.calculator2.Calculator -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'[debug] �[35m[ADB]�[39m Waiting up to 20000ms for activity matching pkg: 'com.google.android.calculator' and activity: 'com.android.calculator2.Calculator' to be focused
[debug] �[35m[ADB]�[39m Possible activities, to be checked: 'com.android.calculator2.Calculator', 'com.google.android.calculator.com.android.calculator2.Calculator'
[debug] �[35m[ADB]�[39m Getting focused package and activity
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window displays'[debug] �[35m[ADB]�[39m Found package: 'com.google.android.calculator' and fully qualified activity name : 'com.android.calculator2.Calculator'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c/appium/device/pixel_ratio] with no body
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":2.75}
[debug] �[35m[WD Proxy]�[39m Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c/appium/device/system_bars] with no body
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":{"statusBar":66}}
[debug] �[35m[WD Proxy]�[39m Matched '/window/current/size' to command name 'getWindowSize'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c/window/current/size] with no body
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":{"height":2088,"width":1080}}
[info] �[35m[Appium]�[39m New AndroidUiautomator2Driver session created successfully, session 8b96643d-2103-4058-862c-b5e2be18cf32 added to master session list
[debug] �[35m[BaseDriver]�[39m Event 'newSessionStarted' logged at 1632073945089 (23:22:25 GMT+0530 (India Standard Time))
[debug] �[35m[W3C (8b96643d)]�[39m Cached the protocol value 'W3C' for the new session 8b96643d-2103-4058-862c-b5e2be18cf32
[debug] �[35m[W3C (8b96643d)]�[39m Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"Android Emulator","platformVersion":"11.0"},"platformName":"android","app":"D:\Workspace\Eclipse\Appium_Hybrid_Framework/apps/Calculator.apk","autoGrantPermissions":true,"automationName":"Appium","deviceName":"emulator-5554","platformVersion":"11","deviceUDID":"emulator-5554","appPackage":"com.google.android.calculator","deviceApiLevel":30,"deviceScreenSize":"1080x2220","deviceScreenDensity":440,"deviceModel":"sdk_gphone_x86_64","deviceManufacturer":"Google","pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":2022}}}
[info] �[35m[HTTP]�[39m �[37m<-- POST /wd/hub/session �[39m�[32m200�[39m �[90m11258 ms - 1018�[39m
[info] �[35m[HTTP]�[39m �[90m�[39m[info] �[35m[HTTP]�[39m �[37m-->�[39m �[37mGET�[39m �[37m/wd/hub/session/8b96643d-2103-4058-862c-b5e2be18cf32/screenshot�[39m
[info] �[35m[HTTP]�[39m �[90m{}�[39m
[debug] �[35m[W3C (8b96643d)]�[39m Calling AppiumDriver.getScreenshot() with args: ["8b96643d-2103-4058-862c-b5e2be18cf32"]
[debug] �[35m[WD Proxy]�[39m Matched '/screenshot' to command name 'getScreenshot'
[debug] �[35m[WD Proxy]�[39m Proxying [GET /screenshot] to [GET http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c/screenshot] with no body[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":"iVBORw0KGgoAAAANSUhEUgAABDgAAAisCAYAAACtR1KuAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N15dJflnfj9z5dAIOwQQGRRQGVVFlfABbWOW/WxtVbbcez4a2fG3+w+\np+3Mmaczj51pO7/x6TKdGbW1Tp1WR6tWi0vVulEXQITKvoMCAgqEIASSEEjyff7gkDGEQJZvvsml\nr9c5PW3u3Pd1XxE8p9937vu6MtlsNhsAAAAACevU3hMAAAAAaC2BAwAAAEiewAEAAAAkT+AAAAAA\nkidwAAAAAMkTOAAAAIDkCRwAAABA8gQOAAAAIHkCBwAAAJA8gQMAAABInsABAAAAJE/gAAAAAJLX\nub0nANlsNkpKSuLll1+OFStWRGlp6VHPKygoiBNPPDHOPffcmD59evTo0SMymUyeZwsAAEBHlMlm\ns9n2ngSfTAcPHoyHH344FixYENXV1dGcv4qZTCaKiori2muvjUsuuUToAAAA+IQTOMi72trauOuu\nu2LlypXNihpHczhs3HPPPdGpU5pvXFVVVUV1dfVRv5fJZKKwsDA6d/awFQAAcGybN2+O4cOH5+Ve\nc+fOjV27dh3znGuuuSYvcznMpybyat26dfGDH/wgamtrczLe4UAyd+7cuOCCC3IyZj7V1tbGSy+9\nFOvWrTtq5OjevXtcdNFFcfrpp38sn1Kprq6O7du3R3V1dQwZMiS6dOnS3lMCAIAk/fznP4/+/fvn\nLXC8+eabsXbt2mOeI3DwsfXggw/GnDlzWv3UxtHMnDmzLnDs2LEjBg0alPN7tIXNmzfHokWLYsuW\nLY2e079//xg6dGj0798/jzPLj6VLl8bDDz8cVVVV8bnPfS4uvvji9p4SAAAk5+c//3nMnTs370Gh\no0nzmX6Sks1m41vf+lbMnj27...
[debug] �[35m[W3C (8b96643d)]�[39m Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAisCAYAAACtR1KuAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N15dJflnfj9z5dAIOwQQGRRQGVVFlfABbWOW/WxtVbbcez4a2fG3+w+\np+3Mmaczj51pO7/x6TKdGbW1Tp1WR6tWi0vVulEXQITKvoMCAgqEIASSEEjyff7gkDGEQJZvvsml\nr9c5PW3u3Pd1XxE8p9937vu6MtlsNhsAAAAACevU3hMAAAAAaC2BAwAAAEiewAEAAAAkT+AAAAAA\nkidwAAAAAMkTOAAAAIDkCRwAAABA8gQOAAAAIHkCBwAAAJA8gQMAAABInsABAAAAJE/gAAAAAJLX\nub0nANlsNkpKSuLll1+OFStWRGlp6VHPKygoiBNPPDHOPffcmD59evTo0SMymUyeZwsAAEBHlMlm\ns9n2ngSfTAcPHoyHH344FixYENXV1dGcv4qZTCaKiori2muvjUsuuUToAAAA+IQTOMi72trauOuu\nu2LlypXNihpHczhs3HPPPdGpU5pvXFVVVUV1dfVRv5fJZKKwsDA6d/awFQAAcGybN2+O4cOH5+Ve\nc+fOjV27dh3znGuuuSYvcznMpybyat26dfGDH/wgamtrczLe4UAyd+7cuOCCC3IyZj7V1tbGSy+9\nFOvWrTtq5OjevXtcdNFFcfrpp38sn1Kprq6O7du3R3V1dQwZMiS6dOnS3lMCAIAk/fznP4/+/fvn\nLXC8+eabsXbt2mOeI3DwsfXggw/GnDlzWv3UxtHMnDmzLnDs2LEjBg0alPN7tIXNmzfHokWLYsuW\nLY2e079//xg6dGj0798/jzPLj6VLl8bDDz8cVVVV8bnPfS4uvvji9p4SAAAk5+c//3nMnTs370Gh\no0nzmX6Sks1m41vf+lbMnj27TeJGRERFRUXd2G+88Ua88sorbXKfXCsrK4uDBw8e85zy8vKorKzM\n04zyZ9...
[info] �[35m[HTTP]�[39m �[37m<-- GET /wd/hub/session/8b96643d-2103-4058-862c-b5e2be18cf32/screenshot �[39m�[32m200�[39m �[90m253 ms - 78038�[39m
[info] �[35m[HTTP]�[39m �[90m�[39m
[info] �[35m[HTTP]�[39m �[37m-->�[39m �[37mDELETE�[39m �[37m/wd/hub/session/8b96643d-2103-4058-862c-b5e2be18cf32�[39m
[info] �[35m[HTTP]�[39m �[90m{}�[39m
[debug] �[35m[W3C (8b96643d)]�[39m Calling AppiumDriver.deleteSession() with args: ["8b96643d-2103-4058-862c-b5e2be18cf32"]
[debug] �[35m[BaseDriver]�[39m Event 'quitSessionRequested' logged at 1632073945559 (23:22:25 GMT+0530 (India Standard Time))
[info] �[35m[Appium]�[39m Removing session 8b96643d-2103-4058-862c-b5e2be18cf32 from our master session list
[debug] �[35m[UiAutomator2]�[39m Deleting UiAutomator2 session
[debug] �[35m[UiAutomator2]�[39m Deleting UiAutomator2 server session
[debug] �[35m[WD Proxy]�[39m Matched '/' to command name 'deleteSession'
[debug] �[35m[WD Proxy]�[39m Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/fa24cb60-ac41-44b9-b1b7-c376f2ecc14c] with no body
[debug] �[35m[WD Proxy]�[39m Got response with status 200: {"sessionId":"fa24cb60-ac41-44b9-b1b7-c376f2ecc14c","value":null}
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop com.google.android.calculator'[debug] �[35m[Logcat]�[39m Stopping logcat capture
[debug] �[35m[ADB]�[39m Removing forwarded port socket connection: 8200
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200'[info] �[35m[UiAutomator2]�[39m Restoring hidden api policy to the device default configuration
[debug] �[35m[ADB]�[39m Running 'C:\Users\rsuya\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''[debug] �[35m[Instrumentation]�[39m .
[debug] �[35m[BaseDriver]�[39m Event 'quitSessionFinished' logged at 1632073946192 (23:22:26 GMT+0530 (India Standard Time))
[debug] �[35m[W3C (8b96643d)]�[39m Received response: null
[debug] �[35m[W3C (8b96643d)]�[39m But deleting session, so not returning
[debug] �[35m[W3C (8b96643d)]�[39m Responding to client with driver.deleteSession() result: null
[info] �[35m[HTTP]�[39m �[37m<-- DELETE /wd/hub/session/8b96643d-2103-4058-862c-b5e2be18cf32 �[39m�[32m200�[39m �[90m634 ms - 14�[39m
[info] �[35m[HTTP]�[39m �[90m�[39m
[debug] �[35m[Instrumentation]�[39m Time: 4.082
[debug] �[35m[Instrumentation]�[39m
[debug] �[35m[Instrumentation]�[39m OK (1 test)[debug] �[35m[Instrumentation]�[39m The process has exited with code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions