6 | Appium Step by Step | How to setup and use Appium Inspector

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • Setup and Start Appium Inspector
    00:00 Intro
    00:47 What we will learn
    02:05 Download and install Appium Inspector github.com/appium/appium-insp...
    OR
    Use web version: inspector.appiumpro.com/
    08:45 : Start Appium Inspector
    As we have not yet started appium server you will get error message
    09:14 Start appium server by running command appium
    If you are using the web version of Appium Inspector start appium using command appium --allow-cors
    Note the host and port of appium server and provide the same in Appium Inspector
    Now again click on Start Session on Appium Inspector
    This time you should see the error message for desired capabilities and not for appium server
    12:29 Add the Desired Capabilities as per the mobile device or emulator connected to the system
    deviceName - can get using command adb devices
    platformName - can get using command appium driver list
    platformVersion - can get using command adb shell getprop ro.build.version.release
    If you have multiple devices connected first get the device id using adb devices then run command
    adb -s DEVICE_ID shell getprop ro.build.version.release
    app - provide the location of APK file
    adb shell getprop ro.build.version.sdk
    This command will provide the API level (e.g., “30” for Android 11, “29” for Android 10, etc.)
    {
    "appium:automationName": "UiAutomator2",
    "appium:platformName": "Android",
    "appium:platformVersion": "11",
    "appium:deviceName": "4b316ae9",
    "appium:app": "/Users/raghavpal/Katalon Studio/Android Testing Project/androidapp/APIDemos.apk"
    }
    20:53 Save and click on Start Session on Appium Inspector
    This should start the session
    26:39 How to use Emulator with Appium Inspector
    Step 1 - Start appium appium --allow-cors
    Step 2 - Start Emulator or Connect Physical Device
    emulator -list-avds
    emulator -avd AvdName
    To start AVD in a new state (w/o maintaining the old state)
    emulator -avd avd_name -no-snapshot-load
    Step 3 - Run command adb devices to see the device id. Can use this for deviceName
    Step 4 - Get the Android version of your device or emulator
    adb shell getprop ro.build.version.release android version
    If you have multiple devices connected first get the device id using adb devices then run command
    adb -s DEVICE_ID shell getprop ro.build.version.release
    adb shell getprop ro.build.version.sdk api level
    Step 5 - Check the appium drivers available appium driver list
    Step 6 - Get location for a demo APK file (for android)
    Step 7 - Add all details in the Desired Capabilities of Appium Inspector
    {
    "appium:automationName": "UiAutomator2",
    "appium:platformName": "Android",
    "appium:platformVersion": "14",
    "appium:deviceName": "emulator-5554",
    "appium:app": "/Users/raghavpal/Katalon Studio/Android Testing Project/androidapp/APIDemos.apk"
    }
    Step 8 - Start Session
    35:10 How to use Browserstack Devices with Appium Inspector
    Use Appium Inspector desktop version
    Step 1 - On Appium Inspector top menu click Select Cloud Providers and select Browserstack
    Step 2 - Create account on Browserstack and get your username and accesskey
    Step 3 - On Browserstack upload your application or use the demo application
    Step 4 - If needed can use capabilities generator www.browserstack.com/app-auto...
    Step 5 - Add the browserstack username, accesskey and desired capabilities in Appium Inspector
    {
    "appium:automationName": "UiAutomator2",
    "platformName": "Android",
    "appium:platformVersion": "9.0",
    "appium:deviceName": "Google Pixel 3",
    "appium:app": "bs://c700ce60cf13ae8ed97705a55b8e022f13c5827c"
    }
    Ref: appium.github.io/appium-inspe...
    Browserstack Capabilities Generator - www.browserstack.com/app-auto...
    SauceLabs Capabilities Generator - saucelabs.com/products/platfo...
    LambdaTest Capabilities Generator - www.lambdatest.com/capabiliti...
    47:15 Next Steps
    Document - docs.google.com/document/d/e/...
    All Free Tutorials 🟢 AutomationStepByStep.com/
    ▬▬▬▬▬▬▬
    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
    ▬▬▬

КОМЕНТАРІ • 26

  • @satheeshv2244
    @satheeshv2244 27 днів тому

    thank you mr.ragav, i opened the calculator app after trying for 1 month.

    • @RaghavPal
      @RaghavPal  26 днів тому

      So happy to know this Satheesh

  • @mohammedmshal3246
    @mohammedmshal3246 8 днів тому

    Thank you so much sir , great work

  • @reviewkiemtiencucde825
    @reviewkiemtiencucde825 26 днів тому

    thank you, you are best

  • @rumpelshtilcken2239
    @rumpelshtilcken2239 18 днів тому

    Hello, Raghav! Thank you for your excellent work!!!
    I encountered the following problem: the session is broken with error code 255 in Appium Desktop, and in the command line, it shows post -500. Appium settings as well as the application are installed on the phone. USB debugging and data transfer are enabled. Have you encountered this problem? The environment is Windows 10, Android 14 Samsung, Appium 2.5.4, Appium-Doctor 1.16.2. Environment variables have also been set. If you have encountered this problem, please advise. I have been searching for a solution for a long time, and everyone writes that you need to enable USB debugging or configure the variables.

    • @RaghavPal
      @RaghavPal  18 днів тому

      Rumpel
      It sounds like you are facing a connection issue with Appium when trying to run tests on your Android device. The error code 255 or post -500 can sometimes be tricky to troubleshoot, but here are a few suggestions that might help you resolve this problem:
      1. Check Appium Logs:
      - Look into the Appium logs to see if there are more detailed error messages or clues about what might be causing the issue. This can provide insights into what specifically went wrong during the session setup.
      2. Update Appium and Dependencies:
      - Ensure that you are using the latest version of Appium and all its dependencies. Sometimes, compatibility issues or bugs in older versions can cause unexpected errors. Consider updating to the latest stable release of Appium.
      3. Restart Appium Server:
      - Try restarting the Appium server, as well as your computer and Android device. This simple step can sometimes resolve connectivity issues by resetting the environment.
      4. Check USB Connection:
      - Double-check the USB connection between your computer and Android device. Use a different USB cable or port to rule out any physical connection issues.
      5. Verify Developer Options:
      - Confirm that USB debugging mode is enabled on your Android device. Additionally, check other developer options related to ADB connections and USB configurations to ensure everything is set up properly.
      6. Verify Appium Server Configuration:
      - Review your Appium server settings and capabilities to make sure they are configured correctly for the Android device and application you are testing. Ensure that the desired capabilities match the device settings and application details.
      7. Permissions and Firewall Settings:
      - Check if any security software or firewall settings on your computer might be blocking the connection between Appium and the Android device. Temporarily disable these security measures for testing purposes.
      --

    • @rumpelshtilcken2239
      @rumpelshtilcken2239 18 днів тому

      @@RaghavPal Thank you, Raghav! I will try to find the problem!

  • @mounithota5156
    @mounithota5156 20 днів тому

    I am unable to open UIAutomateViewer on my Mac. Could you please explain why this issue is occurring?

    • @RaghavPal
      @RaghavPal  20 днів тому

      Mouni
      Are you trying to use UIAutomatorViewer or Appium Inspector. Please check and let me know with specific error and message you are facing

  • @pravalikamailaram4269
    @pravalikamailaram4269 Місяць тому

    Can you please make videos on automating desktop applications using appium in windows/Mac

    • @RaghavPal
      @RaghavPal  Місяць тому

      Sure I will plan on this Pravalika

  • @saicharanboddukuri270
    @saicharanboddukuri270 Місяць тому

    hello sir This series is python with appium or java with appium

    • @RaghavPal
      @RaghavPal  Місяць тому

      Sai
      till now all these sessions are common and deal with the basic setup of appium, android, ios env, appium inspector etc. Not yet started with appium client languages

    • @binhlethanh5682
      @binhlethanh5682 Місяць тому

      Hello Raghav, in the next videos of this series, which language will you use for appium?

    • @RaghavPal
      @RaghavPal  Місяць тому +1

      Bình
      as of now some videos will be dedicated to the setup as we have iOS setup pending. I plan to make this series to enable beginners get started with the complete setup which mostly is the tricky part in Appium and then decide on a language and progress further as per the project needs.

    • @subratregmi-yz4zu
      @subratregmi-yz4zu Місяць тому

      @@RaghavPal create the series in JS

  • @subratregmi-yz4zu
    @subratregmi-yz4zu Місяць тому

    is this work for flutter app and will this driver work for flutter too?
    and please create the series in Javascript

  • @TRB202
    @TRB202 18 днів тому

    hi ragav , i'm getting this Failed to create session. An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device in 20000ms when i try to run on my real device , thank you for ur amezing vdos

    • @RaghavPal
      @RaghavPal  18 днів тому

      Nazra
      is your device setup properly. After connecting your real device, if you open command line and run command adb devices, do you get your device id.
      Have you updated the desired capabilites in Appium Inspector accordingly.
      After this Check the following:
      1. Device Connection:
      - First, ensure that your real Android device is properly connected to your computer via USB.
      - Check if the device appears in the list of connected devices using the `adb devices` command in your terminal. If it doesn't, make sure USB debugging is enabled on your device.
      2. Appium Configuration:
      - Verify that your Appium configuration is correct. Specifically, check the following parameters in your desired capabilities:
      - `deviceName`: Make sure it matches the name of your connected Android device.
      - `platformName`: Set it to `"android"`.
      - `appPackage` and `appActivity`: These should correspond to the package name and main activity of your app.
      - `noReset`: Set it to `true` if you want to reuse the app state between sessions.
      3. Server Path:
      - Appium 2.0 uses a different default server path. Ensure that you're using the correct path in your configuration.
      - If you're migrating from Appium Desktop (which works with Appium 1.x), update the remote server path from `/wd/hub` to just `/` in Appium Inspector
      4. Uninstall UIAutomator:
      - Some users have reported success by uninstalling the UIAutomator apps from their devices.
      - Go to your device's Settings > Apps, search for "uiautomator," and uninstall any related apps.
      - This step can help resolve issues when the session crashes multiple times
      5. Check Server Address:
      - Verify that the server address in your code matches the actual Appium server name.
      - Sometimes incorrect server addresses can lead to session creation failures.
      6. Update Appium:
      - Ensure that you're using a compatible version of Appium. Consider updating to the latest stable release if you haven't already.
      Remember to double-check your configuration, verify the device connection, and follow the steps above. Hopefully, this will help you create a successful session with your real Android device
      --

  • @prateekverma4970
    @prateekverma4970 6 днів тому

    adb command is not running in my machine. how to setup that

    • @RaghavPal
      @RaghavPal  5 днів тому

      Prateek
      If you're encountering issues with the `adb` command, here are some steps you can take to troubleshoot and set it up correctly:
      1. Check if ADB is Installed:
      First, verify that ADB is installed on your system. You can do this by running the following command in your terminal:
      ```
      ~/Library/Android/sdk/platform-tools/adb
      ```
      If it prints output, ADB is installed. If not, proceed to the next steps.
      2. Add ADB to Your System Path:
      - Open your terminal and edit your shell profile file (usually `~/.bash_profile` or `~/.zprofile` if you're using Zsh).
      - Add the following lines to the file:
      ```bash
      export PATH=~/Library/Android/sdk/tools:$PATH
      export PATH=~/Library/Android/sdk/platform-tools:$PATH
      ```
      - Save the file and either restart your terminal or run:
      ```bash
      source ~/.bash_profile
      ```
      (or `source ~/.zprofile` if using Zsh).
      3. Restart ADB:
      - If ADB was already running, kill it using:
      ```bash
      adb kill-server
      ```
      - Then start it again:
      ```bash
      adb start-server
      ```
      4. Check Android Studio and SDK Manager:
      - Launch Android Studio.
      - Go to Tools > Android > SDK Manager.
      - Make sure Android SDK Platform-Tools is installed.
      5. Enable USB Debugging on Your Phone:
      - On your Android device, go to Settings > About phone.
      - Tap on Build number multiple times until you see a message saying you're a developer.
      - Go back to Settings, and now you'll find a Developer options menu.
      - Enable USB debugging.
      6. Restart Your Terminal:
      Sometimes changes to the PATH take effect only after restarting your terminal.
      Remember to replace `` with your actual username in the paths above
      --

  • @user-kr5cm3er3h
    @user-kr5cm3er3h 27 днів тому

    Can you pleas upload the 7th video