Getting exception while running test case in appium - 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

Related

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.

How to upgrade chromedriver version for appium?

I am getting the following error when attempting to run an Appium script on the Chrome Version 65:
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.109)
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.13.4 x86_64)
I have found that the chromedriver version needs to be updated but I can't find a way to successfully do this.
So my question is how do I upgrade the chromedriver version to the latest version?
So first, with each update to Chromedriver there is an increase in the minimum supported version of Chrome => older devices are often unable to be automated with the bundled version.
So its not appium/chromdriver compatibility, its your device browser/ chromdriver versions compatibility check.
To check versions compatibility you go look here
When you figure out whats version works for you, run:
npm install appium --chromedriver_version="2.37"
This version supports Chrome v 64-66
The subjected issue can be resolved (In my case this works) if we pass the additional argument while starting the appium server in the local system.
CLI Command: appium --allow-insecure chromedriver_autodownload
The script will automatically search for the newest chromedriver version that supports the given browser/web view, download it (the hash sum is verified as well for the downloaded archive) and add to the chromedriverChromeMappingFile mapping.
For more details please refer to the official documentation of appium: Compatible chromedriver issue fixes options
Hope this helps!
Thanks.
Please download the latest chromedriver from here :
https://sites.google.com/a/chromium.org/chromedriver/downloads
Upgrade your appium server, appium java client to latest version.

Unable to run Appium tests using Appium run-time 1.6.4

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

Problems by setting up Appium

I want to set up an Appium test automtion framework on Mac OS (El Capitan).
First, I want to run test automation by iOS simulator and the Appium test app UICatalog.
Currently I ran into some problems. Also I have to mention that I'm quite new to testing stuff...
What I have installed so far:
xCode 7.2.1
Appium GUI
Node.js
Java JDK 1.8.0_51
When I run the Appium Doctor by GUI there are no problems listed!
Question so far:
Is the Appium GUI the same as the npm installation like this
npm install -g appium
npm install wd
appium &
Do I still need the selenium package? Or does it come with the Appium GUI?
When I start Appium server by GUI I receive the following state:
Why does it get locked? What is missing?
Do I have to run xCode besides Appium server when I want to test an app?
How do I grant Appium access to the iOS simulator? Is this still necessary? I haven't get an authentification like this.
I hope anyone can give me some hints :).
I see your appium port is running on 4723. When you run your appium test scripts, which has port 4723 mentioned on your script itself. Your automated test cases would automatically run on the 4723.
Appium requires backend server port to be running. This way it communicates with your device.
The appium GUI is the Server GUI which shows what all happens in the back end when u trigger your script. All you need to do is , use the same port no in ur script while running,
eg:
iosDriver driver=new iosDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
I have done automation using Appium+Cucumber+Java so I had the same questions you had. Here are some answers for you based on my experience-
Appium Gui is not the same as npm. They are 2 separate components. Appium uses node.js framework. So you need to install Appium and node.js (npm) separately. The command you mentioned
npm install -g appium
would install the Appium server. To install the Appium GUI you need to download and install it from this link - http://appium.io/downloads.html
Follow these instructions where I give step by step instructions on how to set up Appium - http://www.rajsubra.com/2016/04/03/appiumjavacucumber-set-up-step-by-step-instructions/
If you follow the above steps you should be able to run tests via the iOS Simulator.
Also the state you mentioned in the screenshot with the Appium GUI is the normal expectations. It is just saying the Appium server started via the GUI and also gives you details on what simulator configuration has been selected.

Resources