Android UI automation test with appium - android

I just working on android UI automation test in few weeks. I tried with robotium in a time and now I want change to appium framework. And my question are:
I read that appium is a test tool to test webview application. So how about the other app that is not webview app?
Can I run test from appium on genymotion?
Any other tool do I need to install with appium(selenium or something)?
Edit
When I try to install appium with out sudo I got this error
ERR! Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR! { [Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path:
'/Users//appium/node_modules/.bin/instruments-client.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node"
"/usr/local/bin/npm" "link" "appium-uiauto"
npm ERR! cwd /Users/yaphatak/appium
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path
/Users//appium/node_modules/.bin/instruments-client.js
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users//appium/npm-debug.log
npm ERR! not ok code 0
Then I try with sudo then run appium I got this error
error: Appium will not work if used or installed with sudo. Please
rerun/install as a non-root user. If you had to install Appium using
sudo npm install -g appium, the solution is to reinstall Node using
a method (Homebrew, for example) that doesn't require sudo to install
global npm packages."
Any help?

1- Yes, Appium can test non-webview apps. The first line on the Appium introduction page says:
Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms.
2- Yes, Appium should work with Genymotion. See here for an example.
3- Your tests will need to reference the Selenium libraries in order to communicate with Appium.

Related

I don't know why this is happened and i don't know how to ask this question

I'm using termux app, then i try to install npm packages in the different directory in my phone.
The first one "/storage/shared/coding"
.../0/Coding $ npm i node-session
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated #mapbox/geojsonhint#2.0.1: Please make plans to check GeoJSON in some other way
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../#mapbox/geojsonhint/bin/geojsonhint
npm ERR! dest /storage/emulated/0/Coding/node_modules/.bin/geojsonhint
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'
npm ERR! [Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../#mapbox/geojsonhint/bin/geojsonhint',
npm ERR! dest: '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-04-25T19_14_38_772Z-debug-0.log
.../0/Coding $ pwd
/storage/emulated/0/Coding
And the second one "/noda"
~/noda $ npm i node-session
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated #mapbox/geojsonhint#2.0.1: Please make plans to check GeoJSON in some other way
added 151 packages, and audited 152 packages in 7s
43 packages are looking for funding
run `npm fund` for details
17 vulnerabilities (1 moderate, 12 high, 4 critical)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
~/noda $ pwd
/data/data/com.termux/files/home/noda
Why does node-session can be installed in /noda directory but not in /storage/shared/coding and how can i install it in /storage/shared/coding
NodeJs you installed on Termux doesn't have permission to install dependencies on /storage/emulated/0/Coding/node_modules/.bin/geojsonhint.
You can solve it by:
Changing the directory of the project to somewhere with public permissession.
Running the command with the administration privilege but on Termux, I think.
Using nvm to install node js instead of default ways.
This problem comes when you try to install node js with Termux. try not to.
NVM repository link: nvm-sh/nvm.
pay attention:
You need to check your dependency tree is compatible with the node version you want to install.
If the project is big be careful because you can break your project easily.

Error while trying to install ionic on ubuntu 18.04

How to install ionic 4 in ubuntu 18.04.Which version of npm nodejs cordova android sdk should go hand in hand for installing ionic 4 on ubuntu 18.04.Please do help me.I tried installing but i am getting error when i run the project.
npm ERR! Linux 4.15.0-20-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code Unknown system error -122
npm ERR! errno -122
npm ERR! syscall close
Try this script: Ionic Cordova installer for Ubuntu
Its will Automatically install all required things. Your just have to update after this script.

Unable to start react native app

Guys I am Stuck here I have downgrade both my node and npm in order to run the application
currently my node version is 8.4.0 and npm is 4.6.1
Steps I did are
create-react-native-app SampleApp
cd SampleApp
npm run ios
And the result app is not working
Purushothams-MacBook-Pro:SampleApp Purushotham$ npm run ios
SampleApp#0.1.0 ios /Users/Purushotham/Desktop/Demo/SampleApp
react-native-scripts ios
21:59:37: Starting packager...
21:59:39: Error starting packager: Error: EACCES: permission denied, open '/Users/Purushotham/Desktop/Demo/SampleApp/.expo/packager-info.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! SampleApp#0.1.0 ios: react-native-scripts ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SampleApp#0.1.0 ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Purushotham/.npm/_logs/2017-11-12T16_29_39_085Z-debug.log
After executing sudo chmod -R 777 ~/.expo/ and installing expo.io application in my macbook it gets stuck like thi. you can see the below picture

react native error when install native-base or any

I'm a React Native beginner. I'm having an issue that after I create a project by command react-native init myapp and it is success but when I install native-base
by command npm install native-base --save that has error as following:
npm ERR! code ENOGIT npm ERR! No git binary found in $PATH npm ERR!
npm ERR! Failed using git. npm ERR! Please check if you have git
installed and in your PATH.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\myPC\AppData\Roaming\npm-cache_logs\2017-09-27T09_38_57_379Z-debug.log
I have checked and search google but I cannot find solution to fix it.
I also have installed Git
Help me to fix this. Thanks

Ionic is Not Installing on Windows 7 - Getting Many Errors

I am getting this error while i am trying to install Ionic
$ npm install ionic cordova -g
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\delayed-stream\0.0.5\package.tgz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ionic" "cordova" "-g"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! path C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed
npm ERR! code UNKNOWN
npm ERR! errno -4094
npm ERR! syscall scandir
npm ERR! UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! error rolling back Error: UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed']
npm ERR! error rolling back errno: -4094,
npm ERR! error rolling back code: 'UNKNOWN',
npm ERR! error rolling back syscall: 'scandir',
npm ERR! error rolling back path: 'C:\\Users\\Sridhar\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\npm\\node_modules\\read-installed' }
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Sridhar\npm-debug.log
Please help me to install Ionic
Please follow the below steps to install ionic.
IONIC Setup
Setup Environment (Installations)
Install Node.js
a. http://nodejs.org/download/
install ionic framework
a. $ npm install -g cordova ionic
install android SDK and set environment variables
a. Set following environment variable
b. set ANDROID_HOME=C:\\android-sdk-windows
Install Android Target 19 (follow following steps)
Open the SDK Manager (typing android into the terminal, assuming it's in your file path)
Selected box next to Android 4.4.2 (API 19)
Clicked button Install 8 packages
Install ant using CMD window
npm Install -g ant
a. Add following path in environment variables (PATH):
C:\Users\user.name\AppData\Roaming\npm\node_modules\ant\ant\bin
Once you setup the ionic environment.
Create the basic application for testing.
Open node.js command prompt
ionic start myApp tabs
cd myApp
ionic serve (it will open the application in browser)
ionic platform add android (replace ios with android if you want to add iOS platform)
ionic build android (replace ios with android if you want to build in iOS platform)
ionic emulate android android (replace ios with android if you want to emulate iOS platform)
NOTE: If ERR occurs, follow below link:
installing ionic npm ERR! tar.unpack error
Have you followed the right installation sequence ?
Install or update Node.js
Download the most recent version of Node.js. If you are running an older version of Node, make sure to update it because older versions had issues with npm.
As with the other commands, nodejs should now function in cmd.exe but just to be careful, add the full path to the bin folder in Node to your PATH, which will look something like C:\Program Files\nodejs\bin
Install Cordova
Open a new cmd.exe window, and run:
$ npm install -g cordova
Install Ionic
$ npm install -g ionic
Find the official installation doc and this too for more.

Categories

Resources