How to run Inspector when appium is installed using npm? - appium

I used npm to install appium, but I don't know how to run the inspector.
I need to use the Inspector to locate elements in iOS.
How can I run inspector while using appium from terimnal and not from graphical app?

Appium inspector is not available for command line installation. Better download and install the UI version of appium which support the appium inspector for finding the element easily.
Also Appium inspector won't work in windows machine.

So you can do this by
Install npm (which you have already done
Install the Appium application (Slavo gave the link to Appium site answer)
go to developer settings in the app
Check "Use external appium package
enter in the location of your NPM install in text area.
When you do this the version of appium you installed via npm will be connected to the GUI application.
The gui does have its own version of the appium server, but it is an older version. That said it will still work, though it will be an old version and connecting the most recent version via an npm install and a gui download is the reccommended approach in the appium docs I think

Visit official Appium website
In the middle of the page there is big blue button with label Download Appium.
Download the client app to run the inspector, but before that you should run Appium doctor to check if all dependences were installed properly.

If you have downloaded appium using npm then you will run it through terminal by running "appium" command.
After starting appium server from terminal, open older graphical appium (install it first if you don't have it already). Don't press Launch button from gui. Press apple button and add capabilities there (platform version, device name etc) and press Inspector button.

Related

How to connect flutter to Bluestacks emulator?

I'm setting up an Android device for flutter development and need to have a lightweight emulator. How do I connect bluestacks to flutter? Since the android studio is too slow for my machine and I only have an iPhone.
Yes, You can connect Flutter to Bluestacks.
You have to enable adb on Bluestacks' configurations, by following:
gear icon > Advanced configs > (marks as true: enable ADB connection)
after that, you must to restart your bluestacks, then open a terminal and go to your Android SDK folder:
%localappdata%/Android/Sdk/platform-tools/
then type the follow commands:
adb connect localhost:5555
So, by now if you type flutter devices you will get the emulator device name on the list, then you can run your apps on it
In this case what I would like to suggest you is to download GenyMotion.
Is a very lightweight emulator and it has its own plugin for Android Studio.
I was on a similar situation with an AMD processor and this was a really helpful way for me to test my apps.
Here is the URL for download: http://cloud.geny.io/
Steps
Install the latest version(4.180.10.1006) of bluestack
Open the bluestack
Enable the adb by setting>preferences>tick "Enable Android Debug Bridge"
Open the cmd
Create a flutter project by typing "flutter create [projectName]"
Access to your project folder by typing "cd projectName"
Run flutter app by typing "flutter run"
How to enable adb over bluestack
Step1 - Click the setting(gear)
Step2- Click the preference
Step3 - Scroll Down to Enable Android Debug Bridge
Hello, I hope it's not too late for you - but:
You can use sublime text as editor and for running your app.
You can use command prompt (cmd) on windows and as an emulator, you can use Genymotion.
It will fit for you if you need a light editor along with a good emulator that does not take too much RAM space.
I have tested it, and it was running perfectly.
However, the problem were flutter packages for sublime text(coding helper).
I couldn't find any packages for sublime text, only dart. You can update the question for further information.
I hope you understand this and it will help you.

Not able to inspect element in IOS webview on real devices

I am using appium 1.8.0 with and launching webview from my app. For that webview In IOS I am not able to get the page source and not able to do any operation.
The same thing is working on android.
Do I have to do any steps to enable the IOS webview to get the page source?
The best suggestion could be to use something you are already familiar i.e. chrome dev tools which you have used for android webview inspection, same thing can be used for ios webview also
Install node module
npm install remotedebug-ios-webkit-adapter -g
Start the adapter at port 9000 - This will auto start "ios-webkit-debug-proxy" (Make sure this should be installed as a prerequisite on mac machine)
remotedebug_ios_webkit_adapter --port=9000
Open chrome and navigate to chrome://inspect and iOS targets will show up
More details here on the tools github readme file

Appium Inspector is not identifying some of the elements on IOS Mobile app

React-native Custom Objects Identification
Appium inspector is not able to find the child elements of its parent element.
Could any one please help me out
You can try another inspector utility macaca developed in node.js
To install app-inspector, Node.js environment is required.
To install it use below command
$ npm install macaca-cli -g
Your environment needs to be set up for the particular mobile platforms that you want to view.
Install Android SDK for Android, Xcode for iOS. Verify the environment with macaca-cli.
$ macaca doctor
If you saw some green log information, it means your platform environment is ready. Then you can install app-inspector and use it.
Launch
$ app-inspector -u YOUR-DEVICE-ID
iOS
From command line
$ xcrun simctl list
The command above will list all your iOS simulator devices information. You can find the UDID like XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.
From Xcode
Open your simulator, choose Hardware - devices - manage devices. You will find the identifier in the device information.

Appium installation on Windows 7

I have tried to install Appium on Windows 7 for automated testing of Android mobile apps. but it failed.
Can you please let me know, if Appium could be installed on Windows 7 ?
If yes, can you please give any link or reference where I can find and follow the installation steps on Windows 7.
Yes, You can install Appium on Windows 7.
All you need is to install Appium for Windows along with android-sdk and Genymotion(for running your tests on simulators). You however wont be run your tests on ios as it requires xcode which is not present on Windows.
After you have installed Appium(via .exe or GUI) you'll have a folder created via name Appium (by default in Program Files(x86).
To start your appium server, simple type appium &.
In order to initialize Node/Grid, go to the path where the Appium folder is created and traverse to Appium\node_modules\appium\bin. Initialize your json config using node appium --nodeconfig commands.
You can download Appium for Windows directly from Appium's of cial website (http://appium.io/), or you can clone Appium from https://github.com/ appium/appium.git.
Just to ensure that we are ready to start with the Appium server, enter the following command on the Command Prompt:
node Appium-doctor
You don't need to download Node; you can get it from the Appium bundle. To run the Node commands, you need to set the path for Node (for example, C:\ AppiumForWindows). Before running the command, set the directory as C:\ AppiumForWindows\node_modules\appium\bin.

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