I am attempting to set up Appium and am following the tutorial.
I get to the cd appium; ./reset.sh line in Install Ruby section. I don't have a reset.sh file anywhere. I've installed all prior steps, as well as XCode and Android Dev Studio.
So I tried to skip over that step, and simply run appium with node ., which throws error:
Error: Cannot find module '/Users/myname/Sites/myproject/appium
Obviously it needs a server.js or app.js file, but the git clone git://github.com/appium/appium.git repo clone did not come with one.
I'm not sure which other steps I should take to get Appium started. I simply want to get it running so I can start writing test functional test cases.
Follow these steps:
Install homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Uninstall home-brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Install node and npm:
brew install node
Install appium:
npm install -g appium
To start the appium server, run:
appium
HOW TO FIX ERROR: ENOENT LSTAT NPM WHEN TRYING TO INSTALL MODULES
npm cache clean
error: uncaughtException: fn must be a function
To fix this upgrade node or uninstall node and install node and appium again
brew uninstall node
brew upgrade node
and then install npm again
ios-webkit-debug-proxy installation and use, refer:
https://github.com/penguinho/appium/blob/master/docs/en/advanced-concepts/ios-webkit-debug-proxy.md
https://github.com/google/ios-webkit-debug-proxy
https://github.com/jchuong/ios-webkit-debug-proxy
Install ios-webkit-debug-proxy only in iOS to enable appium to switch to web view context.
brew install ios-webkit-debug-proxy
NOTE: the proxy requires the "web inspector" to be turned on to allow a connection to be established. Turn it on by going to settings > safari > advanced > web inspector - On. Please be aware that the web inspector was added as part of iOS 6 and was not available previously.
brew install --HEAD ideviceinstaller
Related
I have a weird problem in my Ubuntu 14.04.
I was developing a mobile application using Ionic with an API using Django-Rest-Framework. After developing, I downloaded jdk and Android SDK so that I can build the mobile app into APK. I also downloaded the android dependencies or tools needed for building. After I downloaded it all, I go to my mobile app folder and type ionic platform add android to build it. But the terminal response with "No command 'ionic' found". Even typing ionic serve responses the same. I also tried to activate the virtual environment of the API using workon mobile but it responses with workon: command not found. Does anybody have an idea what might be wrong? Thanks
First Check ionic is install or not by using following command
ionic -v
It shows version if it nothing to show then install ionic by using following command
sudo npm install -g ionic
else update ionic by the following command on your terminal
sudo npm update -g
And also if you have not got the result then create symbolic link by using following command
sudo ln -s /usr/bin/nodejs /usr/bin/node
Hope this will help you !!
First install using this two line..
npm install -g cordova ionic
ioniv -v && cordova -v
and then use this line
$ ionic start myapp [template]
$ cd MyIonic2Project/
$ ionic serve
I´m installing appium using these terminal commands:
sudo npm install -g appium
npm install wd
the installation process never ends and the error is :
Error trying to install Chromedriver binary. Waiting and trying again. fn must be a function
i tried to install Chromedriver manually but i still have the same problem, i also tried to do this on a vagrant machine and i still have the same issue and i don't know how to solve this,
if anyone has an answer it will be nice to share
thank you
Do not install nodejs through apt-get, which will need sudo rights and appium will not work if node is installed as sudo user. If you have already installed remove it using
sudo apt-get remove nodejs
sudo apt-get remove npm
Download latest nodejs linux binaries form http://nodejs.org/download/
Extract into a folder that doesn't need sudo rights to access, for example your home folder.
tar -xvf
Add the following line to your ~/.bashrc file.
export PATH=$PATH:<full_path_of_the_extracted_node_folder>/bin
Open a now terminal and do
npm install -g appium
appium
I am using Ubuntu 14.04 version and im trying to work with ionic.
The error comes when I try to:
$ ionic start todo blank
$ cd todo
$ sudo ionic platform add android
$ sudo ionic build android
And I get the following error:
[Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.]
ERROR building one of the platforms: Error: /home/kelvin/Desktop/todo/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/kelvin/Desktop/todo/platforms/android/cordova/build: Command failed with exit code 2
I know there is alot of sites with a answer to this question, but none of them gave me a fix. Or maybe they did, but I didnt understand it. I tried on this site building-ionic-app, but that didnt work either.
I followed this tutorial by Nic Raboy, and its still not working.
Install Android, Cordova, and Ionic Framework in Ubuntu.
So let me explain what I did and maybe that is helpfull to fix my problem:
I started with this guide: Ionic Framework Guide
To install Cordova, make sure you have Node.js installed, then run
Install Node.js
$ sudo apt-get install -y nodejs
$ node -v
v5.0.0
Install Cordova
$ sudo npm install -g cordova
Follow the Cordova platform guides for Android and iOS to make sure you have everything needed for development on those platforms.
Follow the Cordova platform guides for Android
I followed this guilde:
Complete installing guide for android SDK / ADT Bund on Ubuntu
My computer is 64-bit and since im using 14.04.
Step 2: install libgl1-mesa-dev:i386 package.
$ sudo apt-get install libgl1-mesa-dev:i386
Step 3: Install openjdk-6-jdk or better, openjdk-7-jdk
$ sudo apt-get install openjdk-7-jdk
Step 4: Download the Android SDK or the ADT Bundle from here and unzip it to wherever you want.
Then I follow step 4 on techtach Complete Guide
$ wget http://dl.google.com/android/android-sdk_r20-linux.tgz
$ wget http://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86_64-20140321.zip
Then I unzipped the adt-bundle and copied the folders from SDK -> /home/kelvin/android-sdk-linux/
The folders are: build-tools,extras,platforms,platform-tools,system-images,tools.
Then I executed the following command to install latest android updates
$cd ~/android-sdk-linux/tools
$sudo ./android
And installed
Android SDK Tools (24.0.2)
Android SDK Platform-tools (20)
ANDROID SDK Build-tools (19.0.3)
SDK Platform
ARM EABI V7a System Image
Android Support Library
And then open bashrc
$gedit ~/.bashrc
And added the following lines.
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
export ANDROID_HOME=~/android-sdk-linux/tools
Checking if it is right:
$ANDROID_HOME
bash: /home/kelvin/android-sdk-linux/tools: Is a directory
Create the project & Configure Platforms
$ ionic start todo blank
$ cd todo
$ sudo ionic platform add android
$ sudo ionic build android
And I get the following error:
[Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.]
ERROR building one of the platforms: Error: /home/kelvin/Desktop/todo/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/kelvin/Desktop/todo/platforms/android/cordova/build: Command failed with exit code 2
And now im kinda lost. I found a forum where they have the same problem: ANDROID_HOME is not set... and one of the guys suggested.
I finally solved it. It was on my users path but not the root users path. I have to run these commands as a root user. I had to edit my root users .bash_profile file.
and one of the others tells how:
In Ubuntu, do all the commands also root
sudo su
gedit ~/.bash_profile
export ANDROID_HOME=/root/Android/Sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
But a third guy said this is a bad idea, so I didnt do it.
I can run the following command:
$ionic serve
And it runs in the browser, but I cant run for android.
I just read your question and it seems you followed the correct way.I faced the same situation during installation process.
The proper set up an Ubuntu machine for Ionic Framework Android development has many steps.Now there are a ton of options to handle this task, but not many bare bones solutions. Most solutions on the internet explain how to use an IDE, or fail to elaborate a complete installation.
After a research,I have found a nice tutorial by Nic Raboy.I followed this tutorial and everything is fine now.
Install Android, Cordova, and Ionic Framework in Ubuntu
Iam an automation tester having good experience in selenium automation tool and other tools.Now i want to implement mobile automation so i choose appium and started to install but faced number of issues and saw the same issues in several blog to rectify but couldnot.Kindly help me and below is the installation which i followed
1.Installed android sdk.
2.I just followed the instruction in the site http://appium.io/
brew install node # get node.js
npm install -g appium # get appium
npm install wd # get appium client
appium & # start appium
node your-appium-test.js
Now which brew gives me /home/user1/.linuxbrew/bin/brew ,
npm install -g appium but this gives me "Please try running this command again as root/Administrator."
Then i installed nvm then npm to solve this issue but again the same above error.I tried my best but i couldn’t.Can any one help pls.
Below are the configurations
Os:Ubuntu
Mobile Os:Android
Thanks a lot
This sounds like permissions issue with .npm folder in home directory that I faced also. Try following:
Make sure you installed node via homebrew (this will allow you to install Appium to a home directory without sudo). Do not install node via apt. Use brew list to check if node installed via brew.
Fix permissions issues with .npm folder (thanks for this answer): sudo chown -R $(whoami) ~/.npm
Install Appium with: npm install -g appium
I am new in appium(automation testing technology).
I'm using a PC running Ubuntu Linux.
I have searched about this topic but I have not got any useful tutorial. Can anyone point me to the right documentation?
Do not install nodejs through apt-get, which will need sudo rights and appium will not work if node is installed as sudo user. If you have already installed remove it using
sudo apt-get remove nodejs
sudo apt-get remove npm
Download latest nodejs linux binaries form http://nodejs.org/download/
Extract into a folder that doesn't need sudo rights to access, for example your home folder.
tar -xvf <downloaded_binary_tar.gz>
Add the following line to your ~/.bashrc file.
export PATH=$PATH:<full_path_of_the_extracted_node_folder>/bin
Open a now terminal and do
npm install -g appium
appium
I'm sure you will find plenty of tutorials on this (and this will only work for android since you would need an OSX box to do iOS) but here is what we did:
Install nodejs/npm:
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
UPDATE: use homebrew to install node
Install grunt-cli:
npm install -g grunt-cli
If you run into an issue about it not being able to install in a directory, do this.
Install Appium:
npm install -g appium
Set up a symlink in your .bashrc file for Appium:
ln -s /path/to/appium.js /usr/bin/appium
Test to make sure it can run by running appium in your terminal. The output should be something like:
info: Welcome to Appium v0.16.0 (REV 292d265edd9c7aaf96f165009285c814b218363d)
info: Appium REST http interface listener started on 0.0.0.0:4723
info - socket.io started
Install Java JRE 6
sudo apt-get install openjdk-6-jre
Install Android SDK:
Download the SDK and extract it to your home folder.
Launch the Android SDK Manager:
~/path/to/android-sdk/tools/android
Install the packages that you'll need in the new window:
Android 4.X
Android Support Library
Android SUpport Repository
Google Play services
Everything under Tools
Everything under Extras
You can also create a symlink for the Android SDK Manager by doing:
ln -s /path/to/android-sdk/tools/android /usr/bin/android
Steps to get appium working on ubuntu pc :
Install ruby: Paste the below command at terminal and hit enter
sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
Install linux brew:Paste the below command at terminal and hit enter
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
set path for brew
Type: gedit .bashrc at terminal and copy paste following into the .bashrc file
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
Install node:Paste the below commands one by one at terminal and hit enter
brew update
brew install node
brew link node
Install appium
npm install -g appium
npm install wd
To start appium: Paste the below command at terminal and hit enter
appium
Just to save somebodies time: on my Ubuntu 14.04 I was trying to install npm both via sudo apt-get and using binaries. Both approaches were wrong but everything is Ok after I istalled npm via HomeBrew
Steps to install Appium on Linux.
Basics setup from the link.
Now install linuxbrew taking help from the link.
Now use the following commands from the terminal
Make sure to start a new terminal:
brew update
brew install node
brew link node
npm install -g appium#version
Hope this helps those who face the issue installing with "sudo".
Many people face issue while installing appium on ubuntu because we install using sudo we should install appium using npm
Detailed step by step explanation to install appium on Ubuntu using npm
CLICK HERE
To install node.js and appium without sudo we use linuxbrew.
To install linuxbrew these are the dependencies
Ruby 1.8.6 or newer
GCC 4.2 or newer
Git 1.7.12.4 or newer
Linux 2.6.16 or newer
64-bit x86 or 32-bit ARM platform
Install Ruby using below command
sudo apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
Install Linux Brew using below command
ruby -e “$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
Set Path for brew
first type sudo gedit.bashrc in terminal and copy the below in the .bashrc file.export
PATH="$HOME/.linuxbrew/bin:$PATH"exportMANPATH="$HOME/.linuxbrew/share/man:$MANPATH"export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
7 .Install Node:Open new terminal and copy the command and press enter
brew update
brew install node
brew link node
8.Finally Install Appium using below command
npm install -g appium
9.Let's Check if the installation is successfull. Open the terminal and type "appium" and hit enter.You should see something like this in the terminal
info: Welcome to Appium v1.4.12(REV 8db2d00b9afcf2c50a09a80a2e8d56b05a902caf)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
It is very simple and easy, Please check the below steps!.
1) Install latest Node.js
Terminal commands:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
More information please check official website.
2) Install latest Appium
Terminal commands :
npm install -g appium
or
sudo npm install -g appium
More information please check official documentation.
I've installed the NVM on CentOS 7 and it works perfectly.
curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash
I will strongly recommend going for that with which you will have control of NodeJS versions.
Btw, Linuxbrew doesn't work for me.
I can tell about the 14.04 version
Download the file from https://nodejs.org/en/
2.Now for extracting the file path press
Ctrl+l , it will give the exact path , copy it
3.open bash.src file and it has to be open with gedit, this file is hidden
Press Ctrl+h to see the hidden files
4.now in the bash.src file,paste the below commands
export PATH=$PATH:"somepath u copied upto bin"
export NODE_PATH=$PATH:"somepath u copied upto bin node_modules'"
It will surely work