7 | Appium Step by Step | Complete Hands On DEMO and Recording with Appium Inspector
Вставка
- Опубліковано 28 лип 2024
- 00:00 Introduction
01:27 Start Appium
03:17 Start Appium Inspector
04:52 Add appium session details in Session Builder
07:04 Get desired capabilities for real mobile device
18:54 Get desired capabilities for virtual device (Emulator)
23:31 Add desired capabilities and start session of Appium Inspector
24:28 Appium Inspector home screen - Session Inspector
29:10 Screenshot Panel
34:10 Source Tab
35:35 Commands Tab
37:01 Gestures Tab
38:04 Swipe up and down gestures
47:54 Drag and Drop
49:58 Zoom in and out
53:57 Recorder Tab
58:16 Session Information Tab
59:39 Summary
How to use Appium Inspector with real devices and emulators
Complete hands-on tour and demo of Appium Inspector
Learn all tabs and functionality of Appium Inspector
How to do different mobile actions and gestures
How to record and generate code for mobile testing
All Free Tutorials 🟢 AutomationStepByStep.com/
Document - docs.google.com/document/d/e/...
▬▬▬▬▬▬▬
Share with all who may need this
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
▬▬▬▬ USEFUL LINKS ▬▬▬▬
Ask Raghav - bit.ly/2CoJGWf
Shorts Eng - bit.ly/3H9bifV
Shorts Hindi - bit.ly/3XY7XqN
GitHub Repositories - github.com/Raghav-Pal
Udemy - automationstepbystep.com/udem...
Stories - automationstepbystep.com/stor...
▬▬ CI | CD | DEVOPS ▬▬
Jenkins Beginner - bit.ly/2MIn8EC
Jenkins Tips & Trick - bit.ly/2LRt6xC
Docker - bit.ly/2MInnzx
Jenkinsfile - bit.ly/3JSMSZ7
Kubernetes - bit.ly/2MJIlMK
Vagrant - bit.ly/3MVKdBt
Ansible - bit.ly/3MUsY3h
▬▬ UI TESTING ▬▬
Selenium Beginners - bit.ly/2MGRS8K
Selenium Java Framework from Scratch - bit.ly/2N9xvR6
Selenium Python - bit.ly/2oyMp5x
Selenium 4 - bit.ly/3AiJOlP
Selenium Tips - bit.ly/2owxc50
Selenium Builder - bit.ly/2MKNtlq
Katalon Studio - bit.ly/2wARFdi
Robot Framework with RIDE- bit.ly/2Px6Ue9
Robot Framework with Eclipse - bit.ly/2N8DZxb
Protractor - bit.ly/2KtqVkU
AccelQ - bit.ly/3PlsAsh
Test Project - bit.ly/2DRNJYE
Cucumber BDD - bit.ly/3Cnno4z
Cypress - bit.ly/3PpEukM
Playwright - bit.ly/3iuPByJ
WebdriverIO - bit.ly/3IJyofA
XPath & Web Locators - bit.ly/3PpEvoQ
▬▬ API TESTING ▬▬
Web Services (API) - bit.ly/2MGafL7
SoapUI - bit.ly/2MGahmd
Postman - bit.ly/2wz8LrW
Postman 2022 - bit.ly/3JWm4qX
Rest Assured - bit.ly/3zUdhRD
Karate API Testing - bit.ly/3w3H5Ku
General - bit.ly/2PYdwmV
JMeter API Testing - bit.ly/3AgVPar
Katalon Studio API Testing - bit.ly/2BwuCTN
API Mocking - bit.ly/3bYPsjS
▬▬ MOBILE TESTING ▬▬
Appium - bit.ly/2ZHFSGX
Mobile Playlist - bit.ly/2PxpeUv
▬▬ PERFORMANCE TESTING ▬▬
JMeter Beginner - bit.ly/2oBbtIU
JMeter Intermediate - bit.ly/2oziNVB
JMeter Advanced - bit.ly/2Q22Y6a
JMeter Tips & Tricks - bit.ly/2NOfWD2
Gatling - bit.ly/3QrWfkV
Performance Testing - bit.ly/2wEXbLS
▬▬ SOURCE CODE MANAGEMENT ▬▬
Git & GitHub - bit.ly/2Q1pagY
GITLAB - bit.ly/2kQPGyQ
▬▬ IDE ▬▬
Eclipse - bit.ly/3AnRhQP
IntelliJ IDEA - bit.ly/3AnyDZ8
Visual Studio Code - bit.ly/2V15yvt
▬▬ PROGRAMMING ▬▬
Java Beginners - bit.ly/2PVUcXs
Java Tips & Tricks - bit.ly/2CdcDnJ
Groovy - bit.ly/2FvWV5C
JavaScript - bit.ly/2KJDZ8o
TypeScript - bit.ly/3dvJBmz
Python - bit.ly/2Z4iRye
Ruby - bit.ly/3JRRmzf
▬▬ BUILD TOOLS ▬▬
Maven - bit.ly/2NJdDRS
Gradle - bit.ly/30l3h1B
▬▬ CLOUD SERVICES ▬▬
Browserstack - bit.ly/3w7kxZn
Saucelabs - bit.ly/3w7kAo1
LambdaTest - bit.ly/3C6TBwM
▬▬ DATA FORMATS ▬▬
JSON - bit.ly/3w450tq
XML - bit.ly/3PqRneH
▬▬ OTHERS ▬▬
Virtualization on Windows - bit.ly/2SItIL9
Mock Interviews - bit.ly/3QGwwVJ
Redis - bit.ly/2N9jyCG
Misc - bit.ly/2Q2q5xQ
Tools & Tips - bit.ly/2oBfwoR
QnA Friday - bit.ly/2NgwGpw
Sunday Special - bit.ly/2wB23BO
-
very informative, clear steps for appium setup, Thanks Raghav!
Most welcome Vikram
Thank you so much sir , great work
Most welcome
Thank you sir !🙏🙏🙏
Most welcome Surya
Hi Raghav great work. Are you uploading a demo on using real android device how to automate a test case in the appium inspector ?
Yes Ujjal
@@RaghavPalthanks a lot.
Hi Raghav, thanks for your tutorials, they're so helpful. Could you please demo how to use the recording in IntelliJ?
Sure Maria
Here's a step-by-step guide:
1. Start IntelliJ IDEA and open the project you want to record.
2. Go to the "Help" menu in the toolbar at the top.
3. In the drop-down list, select "Start Screen Recording...". This will open a dialog box for screen recording settings.
4. In the dialog box, you can choose the recording options such as the frame rate, whether to capture mouse clicks, whether to highlight the mouse cursor, and the save location for the video file.
5. After setting your preferences, click "Start Recording".
6. Now, all your actions in IntelliJ IDEA will be recorded. You can perform the tasks you want to record.
7. Once you're done, go back to the "Help" menu and select "Stop Screen Recording". Your recording will be saved to the location you specified.
8. You can now review the video file for any necessary edits or share it as needed.
Please note that this feature might not be available in all versions of IntelliJ IDEA. If you don't see the option, you might need to update your software or use a third-party screen recording tool. Also, recording might increase the CPU usage and slow down the performance of the software.
--
Hi Raghava,
Those videos are very useful for all learners
Please can you share with latest updated frameworks section for AI automation it is very useful in the current market
Sure Krishna, what AI tool are you referring to here
@@RaghavPal Thanks for the Quick Response
We need the latest Selenium with Java and Rest Assured updated classes for real-time experienced
Those classes are useful for me but I have Automation step-by-step some classes are outdated
Once again Thank you so much for your help
Sure, I will plan on that Krishna
When my laptop runs the emulator command to get to the virtual screen, it's very slow and doesn't seem to be able to load. Is there any way to make it run faster?
Android emulators can sometimes be sluggish, but there are several ways to improve their performance. Here are some tips to speed up your Android emulator:
1. Enable Quick Boot: Android Studio provides a feature called Quick Boot that saves the emulator state. When you enable this option, the emulator starts up quickly on subsequent boots. To enable Quick Boot:
- Click on the emulator's edit button in Android Studio.
- Go to "Show Advanced Settings."
- Enable the Quick Boot option
2. Increase Heap Size: You can significantly speed up the emulator by adjusting the heap size allocated to it. Follow these steps:
- Open the AVD Manager.
- Select your device.
- Click on the "Details" button.
- Look for the heap size (usually set to 24 or 48).
- Increase the heap size to a larger value (e.g., 512 or 1024)
3. Use GPU Emulation: The GPU (graphics processing unit) is faster than the CPU. Enabling GPU emulation can improve the emulator's performance. To enable GPU emulation:
- Open the AVD Manager.
- Edit your AVD.
- Enable GPU acceleration in the settings
4. Allocate Sufficient Resources: If you're running the emulator on a virtual machine, ensure that the VM has enough resources (CPU, RAM, and disk space). Virtual machines often have limited resources compared to physical machines, which can impact performance
5. Consider Alternative Emulators:
- Genymotion: Genymotion is an alternative emulator that is much faster than the default Android emulator. It's straightforward to install and provides better performance
- BlueStacks: BlueStacks is another emulator that you can use for testing. It's not specifically for development, but it's fast and reliable
Remember that the emulator experience can vary based on your system specifications. If possible, test your app on an actual device as well to ensure accurate performance.
Thank you…. How many videos will be uploaded in total in this series?
A few more Helen. I am planning to cover the entire setup part of android and ios with appium
Sir i have completed all the videos in this playlist and wanted to know if you have paid or unpaid recorded/live (any) course for mobile testing Appium as I need to quickly learn this skill for my current job. Alternatively if you can suggest any other course or any playlist to learn Appium from scratch to advance.
Additionally, I loved your teaching style ❤, and impatiently waiting for the upcoming videos
Thanks Harshit, can find all here - automationstepbystep.com
Do you have any tutorials for Automating Windows desktop java application
Santhosh
I created some random videos like
ua-cam.com/video/IqEZB4nVem8/v-deo.html
ua-cam.com/video/hzzGzZRj9XI/v-deo.html
Hi Raghav thank you for this video..can you pls upload tutorials for appium for ubantu?
ok, please let me know what specific do you need for Ubuntu
Mobile automation setup on ubantu for appium
okay, please follow these steps for setting up Appium mobile test automation on Ubuntu:
1. Install Prerequisites:
- Ensure you have the following prerequisites installed on your Ubuntu machine:
- Java Development Kit (JDK): You'll need JDK installed. You can check if it's already installed by running `java -version`. If not, install it using `sudo apt install default-jdk`.
- Android SDK or Xcode: Depending on the platform you want to test (Android or iOS), install the corresponding SDK. For Android, you can install Android Studio and set up the Android SDK. For iOS, you'll need Xcode installed on a macOS machine.
2. Install Node.js:
- Appium is built on Node.js, so you'll need to install it. Run the following commands:
```bash
sudo apt update
sudo apt install nodejs npm
```
3. Install Appium Server:
- Install Appium globally using npm:
```bash
sudo npm install -g appium
```
4. Start Appium Server:
- Open a terminal and start the Appium server:
```bash
appium
```
5. Create a New Appium Project:
- Create a new directory for your Appium project:
```bash
mkdir my-appium-project
cd my-appium-project
```
6. Initialize a Node.js Project:
- Initialize a new Node.js project (if you haven't already):
```bash
npm init -y
```
7. Install Appium Client Libraries:
- Depending on your preferred programming language, install the corresponding Appium client library. For example, if you're using JavaScript, install the `webdriverio` package:
```bash
npm install webdriverio
```
8. Write Your First Test Script:
- Create a test script (e.g., `my-test.js`) using your preferred text editor.
- Import the necessary modules (e.g., `webdriverio`).
- Set up your desired capabilities (platform, device, app path, etc.).
- Write your test steps (e.g., navigating to a URL, interacting with elements, assertions).
9. Run Your Test:
- Execute your test script using Node.js:
```bash
node my-test.js
```
10. Inspect Elements and Locators:
- Use Appium Inspector or UIAutomatorViewer (for Android) to inspect elements and find their locators (IDs, XPaths, etc.).
Remember that this is a high-level overview, and you might need to adjust some steps based on your specific requirements. Additionally, explore the official Appium documentation and community resources for more detailed information and examples
My gosh!! Thank you so much 🥺
Please can you upload appium project with javascript
I will plan on this
Hello, when is next video
I am preparing for it should get it by next week
@@RaghavPal I'm very excited and waiting for your next video, you teach very well
Greetings Sir, I hope you are doing well.
I'm getting this Appium Inspector error when I start the session with my real Android device.
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\Users\\SQA\\SDKTools\\platform-tools\\adb.exe -P 5037 -s RZCW50D238B shell cmd package list packages' exited with code 255'; Command output: Exception occurred while executing 'list': java.lang.SecurityException: Shell does not have permission to access user 150
How can I solve this issue?
Thank you!
Atik
Let's work through the solution step by step.
The error message indicates that Appium Inspector is unable to create a session with your real Android device due to an unknown server-side error. The original error is related to executing an `adb` command, specifically `adb shell cmd package list packages`, which is used to retrieve a list of installed packages on the device.
The error code 255 suggests that the command execution failed, and the command output provides more information about the error: `java.lang.SecurityException: Shell does not have permission to access user 150`.
Step-by-Step Solution
To resolve this issue, follow these steps:
1. Enable USB Debugging and Grant Permissions
* Connect your Android device to your computer using a USB cable.
* Go to your device's Settings > Developer options > USB debugging and ensure it is enabled.
* You may also need to grant permission to the computer by selecting "Allow USB debugging" on your device.
2. Restart the ADB Server
* Open a command prompt or terminal window on your computer.
* Navigate to the platform-tools directory where `adb.exe` is located (in this case, `C:\\Users\\SQA\\SDKTools\\platform-tools\\`).
* Run the command `adb kill-server` to stop the ADB server.
* Run the command `adb start-server` to restart the ADB server.
3. Check ADB Permissions
* Run the command `adb shell pm list packages` to test if ADB has the necessary permissions to access the device.
* If you encounter the same error, try running the command with elevated privileges using `adb root shell pm list packages`.
4. Grant Shell Permission to Access User 150
* Run the command `adb shell pm grant android.permission.INTERACT_ACROSS_USERS android.uid.system` to grant the shell permission to access user 150.
* Alternatively, you can try running `adb shell pm grant android.permission.INTERACT_ACROSS_USERS ` replacing `` with the package name of the app you're trying to automate.
5. Restart Appium Inspector
* Close and restart Appium Inspector.
* Try creating a new session with your Android device again.
By following these steps, you should be able to resolve the error and successfully create a session with your Android device using Appium Inspector
-
Hi! Raghva
when i run the start session
it say
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\android\\platform-tools\\adb.exe -P 5037 -s 1b34effa install -g C:\\Users\\m1582\\.appium\
ode_modules\\appium-uiautomator2-driver\
ode_modules\\io.appium.settings\\apks\\settings_apk-debug.apk' exited with code 1'; Command output: adb: failed to install C:\Users\m1582\.appium
ode_modules\appium-uiautomator2-driver
ode_modules\io.appium.settings\apks\settings_apk-debug.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
I don't know what wrong with it
when i run appium-doctor --android
it say
appium-doctor --android
Let's break down the error message and troubleshoot the issue step by step.
What's happening:
1. Appium is trying to create a new session.
2. To do so, it needs to install the `settings_apk-debug.apk` file on the Android device.
3. The installation command is executed using `adb.exe` (Android Debug Bridge).
4. The command fails with an exit code of 1, indicating an error.
5. The error message is `INSTALL_FAILED_USER_RESTRICTED: Install canceled by user`.
Possible Causes:
1. User restrictions: The error message suggests that the installation was canceled by the user. This might be due to a restriction on the device or in the Android settings.
2. ADB issues: There could be a problem with the `adb.exe` command or the Android SDK installation.
Troubleshooting Steps:
1. Check Android settings: Go to the Android device's Settings > Security > Unknown sources and ensure that it is enabled. This will allow the installation of apps from unknown sources
2. Disable user restrictions: On some devices, there might be a restriction on installing apps from unknown sources. Check the device's settings to see if there's an option to disable this restriction
3. Verify ADB installation: Run `adb devices` in the command prompt/terminal to check if ADB is working correctly. If not, reinstall the Android SDK or update the platform-tools
4. Check appium-doctor output: You mentioned running `appium-doctor --android`. Please share the output of this command. It might provide more information about the issue
5. Try reinstalling the APK: Delete the `settings_apk-debug.apk` file from the specified location and try running the Appium test again. This might force Appium to reinstall the APK
-
@@RaghavPal thank you so much!
Do you have any tutorials for mobile automation test using appium and javascript
not yet