Unable to run Appium tests using Appium run-time 1.6.4 - appium

Below is my set-up
1. Appium Server 1.6.6-beta.2
with this set-up tests are failing with following error message:
Blockquote[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSSim] Using fkill to kill processes: 285
[XCUITest] AggregateError:
Error: Killing process 285 failed: Operation not permitted
at Promise.all.then (/usr/local/lib/node_modules/appium/node_modules/fkill/index.js:41:10)
at AggregateError (/usr/local/lib/node_modules/appium/node_modules/aggregate-error/index.js:19:3)
at Promise.all.then (/usr/local/lib/node_modules/appium/node_modules/fkill/index.js:41:10)
at process._tickCallback (internal/process/next_tick.js:109:7)
{ AggregateError:
Error: Killing process 285 failed: Operation not permitted
at Promise.all.then (/usr/local/lib/node_modules/appium/node_modules/fkill/index.js:41:10)
at AggregateError (/usr/local/lib/node_modules/appium/node_modules/aggregate-error/index.js:19:3)
at Promise.all.then
But tests are running all fine with old Appium IDE Version 1.5.3 (Ara), available on same machine macOs Sierra 10.12.3
Could you please advise me what needs to be corrected?
Many thanks
more tracelog at below gist:
gist.github.com/anonymous/bfb8464c0388b7bfdba567dba5f0e36a

Any reason you updated appium from 1.5.3 to 1.6.4?
appium 1.6 and greater version are used to automate iOS10 and greater and there is a version compatibility issue you might face.

Its clear from stack trace what is the issue:
org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: By.name: Create a photo book
You are using not-supported locator strategy By.name. Appium server 1.5.0 release note: Remove long-deprecated name locator strategy

Related

“adb devices” detect my device but not Appium server, why?

Environment:
Windows 10
Python 3.7.9
Appium 1.22.3
Node v12.15.0
Android Debug Bridge version 1.0.41
Version 33.0.2-8557947
Sdkmanager 4.0.1
Appium-Python-Client==2.4.0
Problem:
Appium doesn't detect my device:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Device E531XE1ZM11302266 was not in the list of connected devices
at getResponseForW3CError (C:\Users\gauth\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\gauth\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)
So I run the command "adb devices" which shows correctly my device.
Is there any process to fix this kind of issue please? How could I fix that?

Futter Driver Automation Testing not working due upgrade in version of Flutter Driver

Can some one help where our app is not showing in Appium inspector and even not working for Automation code in intellij after upgrade to Flutter driver version 3.0
getting error: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot read property 'match' of undefined
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
To fix this, Upgrade to appium-flutter-driver v1.7.0 with Appium 2 (2.0.0-beta.43 is the latest when I'm posting this)
Start Appium server using the command appium -p 4726 --base-path /wd/hub as sometimes starting server with default port was not working fine!
If you are not on Appium 2 already, check this guide for migration, I found it helpful
https://www.headspin.io/blog/migrating-to-appium-2-0-part-1-capability-prefixes
https://www.headspin.io/blog/installing-appium-2-0-and-the-driver-and-plugins-cli

How to fix Failure “INSTALL PARSE FAILED NO CERTIFICATES” for Appium & Python?

I am making an automation script to automate a Real SMartphone Android 8.1:
Environment
Python 3.7
Windows 10 64Bits
Build-tools 29.0.3
java version "1.8.0_241"
Appium 1.17.1
Node v12.15.0
sdkmanager 4.0.1
ADB (Android Debug Bridge) version 1.0.41
Version 30.0.3-6597393
When I run my script, I get these error message:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
--> We can't open Instagram. Please check if device is connected. Let's try again!
Message: An unknown server-side error occurred while processing the command. Original error: Performing Push Install
C:\Users\Nino\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk: 1 file pushed, 0 skipped. 87.8 MB/s (470052 bytes in 0.005s)
Appium log file:
https://github.com/gauthierbuttez/public/blob/master/appium_issue04082020.log
What I've tried:
I added this desired capability:
desired_caps['remoteAppsCacheLimit'] = 0
It didn't help.
I reset factory my Android device but it didn't help.
Does anyone already faced this issue?
Try to add noSign: true to capabilities. It might help.
I also suggest manually removing Appium Settings and Instagram apps before starting a new session.

Getting exception while running test case in appium

I am a newbie to Appium, recently i am trying to run my first appium test case, but getting below error:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session.
I am using appium server 1.6.3 on localhost, and also i am using selenium server 3.4.0 and appium java client version java-client-5.0.0-BETA7.
Please help me out to resolve this issue.
Thanks in advance
Several notes:
avoid using beta builds when you start with new open-source tool
Appium already includes specific selenium version, so by setting it yourself you may get incompatibility issue.
Try with appium stable appium server v1.7.2 and java client v5.0.4

iOS support for appium on windows

I am trying to run my script on iPHONE 5 which is connected to my windows machine. I am getting below error:
ERROR: debug: Appium request initiated at /wd/hub/session
info: Configuring Safari session
ERROR: debug: Request received with params: {"desiredCapabilities":{"browserName":"Safari","device":"iPhone 5s white"}}
info: Trying to use mobile safari, version 18
info: Looking for built in app MobileSafari
ERROR: error: xcode-select threw error Error: Command failed: 'xcode-select' is not recognized as an internal or external command,
ERROR: operable program or batch file.
ERROR:
info: Got configuration error, not starting session
ERROR: error: Stderr: 'xcode-select' is not recognized as an internal or external command,
ERROR: operable program or batch file.
ERROR:
ERROR: error: Stdout:
ERROR: error: Could not prepare mobile safari with version '18': Error: xcode-select threw an error
ERROR: error: Failed to start an Appium session, err was: Error: xcode-select threw an error
info: Cleaning up appium session
info: Error: xcode-select threw an error
at D:\QM_Work\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\lib\helpers.js:523:10
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: xcode-select threw an error)","origValue":"xcode-select threw an error"},"sessionId":null}
POST /wd/hub/session 500 1379ms - 204b
As mentioned in the doumenations of Appium you need OSX to test iOS:
http://appium.io/slate/en/master/?ruby#toc_25
It is possible to run the tests from a windows machine but not the way you are probably thinking. You will still need a mac. Here are the requirements:
A mac on your network with Appium server running
Has Appium environment installed properly
Has the .app on the machine
If you have these three reqirements fulfilled and there is no firewall blocking network access to the mac then you can do it. You will have to actual tests on the windows machine but instead of specifying 127.0.0.1:8080 in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.
Remember that you have to specify the path of the .app in the test which is running from your windows machine. But the catch is that the path has to be the path of the .app in the mac and not on your windows machine.
So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the mac but you will get the "pass" or "fail" update on your Windows machine.
You cannot use Windows for iOS testing because Appium requires Instruments and some other native, OSX-only libraries to tell the phone what to do. (source)
Workarounds:
look into a mac mini hosting service, where you can run your iOS tests on a virtual machine.
buy a mac mini

Resources