2 | Appium Step by Step | Complete Setup for Android Mobile Testing without using Android Studio

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 54

  • @nitinjawale1624
    @nitinjawale1624 5 месяцев назад

    Sir waiting for the next video and please make a complete session for mobile automation testing.

    • @RaghavPal
      @RaghavPal  5 месяцев назад

      Coming soon Nitin... keep learning

    • @nitinjawale1624
      @nitinjawale1624 5 месяцев назад

      @@RaghavPal Thank you sir

  • @NavneetMishra-q3k
    @NavneetMishra-q3k 4 месяца назад

    I have installed Appium apps that version - 1.15.1
    But not visible in cmd, showing an error - 'appium' is not recognized as an internal or external command,
    operable program or batch file.

    • @RaghavPal
      @RaghavPal  4 месяца назад +1

      Navneet
      The error message "'appium' is not recognized as an internal or external command, operable program or batch file" indicates that the system cannot find the "appium" command in the current environment. This typically happens when Appium is either not installed or not added to the system's PATH variable.
      Let's troubleshoot this issue step by step:
      1. Check Appium Installation:
      - First, ensure that you have correctly installed Appium. If not, download and install it from the official website.
      - Make sure you've followed the installation instructions for your operating system.
      2. Add Appium to PATH:
      - The PATH environment variable contains a list of directories where the system looks for executable files.
      - To add Appium to the PATH:
      - Open the System Properties (you can search for it in the Start menu).
      - Go to the Advanced tab and click on the Environment Variables button.
      - In the System Variables section, find the Path variable and click Edit.
      - Add the path to the directory where Appium is installed (e.g., `C:\Program Files
      odejs`) to the list of paths. Separate multiple paths with semicolons.
      - Click OK to save the changes.
      - Restart your command prompt or terminal for the changes to take effect.
      3. Verify Installation:
      - Open a new command prompt or terminal window.
      - Type `appium --version` and press Enter.
      - If you see the version number (e.g., "1.15.1"), then Appium is correctly installed and added to the PATH.
      4. Check Node.js Installation:
      - Appium relies on Node.js. Ensure that Node.js is installed and also added to the PATH.
      - You can download Node.js from the official website and follow the installation instructions.
      5. Restart Command Prompt or Terminal:
      - Sometimes, changes to the PATH variable require restarting the command prompt or terminal.
      - Close any existing command prompt or terminal windows and open a new one.
      6. Check for Typos:
      - Double-check that you're typing the command correctly. It should be `appium`, not `Appium` or any other variation.
      7. Reinstall Appium (if necessary):
      - If none of the above steps work, consider uninstalling and reinstalling Appium.
      - Make sure to follow the installation instructions carefully.
      Remember to verify each step

  • @sreeni417
    @sreeni417 5 месяцев назад +1

    Hi Raghav, Can you please make a Playlist on Playwright with Typescript and cucumber BDD framework.

    • @RaghavPal
      @RaghavPal  5 месяцев назад

      I will plan Sreeni

  • @STD2580
    @STD2580 4 месяца назад

    Hi Raghav, on mac machine, i had set the android_home and saved it and then android_home is not detected in terminal

    • @RaghavPal
      @RaghavPal  4 месяца назад

      Sudheer
      did you add the variables in the env file and saved it. Check the names and paths again. Also after this try to check on a new terminal window. If you still face issues, send me your steps

  • @zeisscai9311
    @zeisscai9311 2 месяца назад

    thank you for video❤

  • @essoapp
    @essoapp 5 месяцев назад

    please upload the next , next episodes on the next day , please try to complete this tutorial soon

  • @fathimanazra1279
    @fathimanazra1279 5 месяцев назад

    hi sir which is better downloading android studio or SDK tools only ?

    • @RaghavPal
      @RaghavPal  5 месяцев назад +1

      Android Studio is a complete platform for android development. So if you only want to setup Android env for testing, can go with SDK tools only. In the next video i will also cover how to create Emulators without using Android Studio and with both

  • @sowmyakuruvella
    @sowmyakuruvella Месяц назад

    I am getting this error when I tried to run the
    sdkmanager "platform-tools" "platforms;android-33"
    Warning: Failed to read or create install properties file.
    [=== ] 10% Installing Android SDK Platform 33 and it stops installation. What should I do?

    • @RaghavPal
      @RaghavPal  Месяц назад +1

      Sowmya
      Let's work through this problem step by step to resolve the error you're encountering with `sdkmanager`.
      ### Step 1: Check SDK Manager Installation
      Ensure that the SDK Manager is properly installed and accessible from your command line. You can verify this by running:
      ```bash
      sdkmanager --list
      ```
      This command should list all available and installed packages.
      ### Step 2: Accept Licenses
      Sometimes, the issue arises due to unaccepted licenses. Run the following command to accept all SDK licenses:
      ```bash
      sdkmanager --licenses
      ```
      Follow the prompts to accept the licenses.
      ### Step 3: Separate Commands
      Instead of running multiple package installations in a single command, try installing them separately:
      ```bash
      sdkmanager "platform-tools"
      sdkmanager "platforms;android-33"
      ```
      This approach can help isolate the issue.
      ### Step 4: Check Permissions
      Ensure that you have the necessary permissions to read and write in the SDK installation directory. You can try running the commands with elevated privileges:
      ```bash
      sudo sdkmanager "platform-tools"
      sudo sdkmanager "platforms;android-33"
      ```
      ### Step 5: Verify SDK Path
      Make sure that the SDK path is correctly set in your environment variables. You can check this by running:
      ```bash
      echo $ANDROID_HOME
      ```
      Ensure that the path points to the correct SDK directory.
      ### Step 6: Update SDK Manager
      Ensure that you are using the latest version of the SDK Manager. You can update it by running:
      ```bash
      sdkmanager --update
      ```
      ### Step 7: Manual Installation (Optional)
      If the above steps do not resolve the issue, you can manually download and install the required packages:
      1. Go to the [Android SDK Downloads]( developer.android.com/studio#downloads ) page.
      2. Download the required packages (e.g., platform-tools, platforms;android-33).
      3. Extract and place them in the appropriate directories within your SDK installation path.
      ### Summary
      By following these steps, you should be able to resolve the error and successfully install the required packages. If you continue to face issues, please let me know, and we can explore further troubleshooting steps
      --

  • @potify3315
    @potify3315 4 месяца назад

    Hi teacher, the teaching was really great, but I did not find how to fix the error
    ✖ android could NOT be found in C:\android!

    • @RaghavPal
      @RaghavPal  4 месяца назад

      I believe it is due to ANDROID_HOME env variables is either not set or the path is not proper. Please check with the video again

  • @PDhakad4
    @PDhakad4 5 месяцев назад

    Hi boss thank you for video

  • @GracyIma
    @GracyIma 5 месяцев назад +1

    Sir please kindly complete it thank you

    • @RaghavPal
      @RaghavPal  5 месяцев назад +1

      Yes Grace.. in the process

  • @tabitavadranam1808
    @tabitavadranam1808 Месяц назад +1

    after seting the path varible for build tools and platform tools again showing error that android home is not set before build tools and platform tools it came correct only i have set the path like in the video u have provided and docs also can pls explain me how to overcome it

    • @RaghavPal
      @RaghavPal  Месяц назад +1

      Tabita
      Let's break down the problem step by step:
      Error Message: "Android home is not set before build tools and platform tools"
      What it means: The error message is indicating that the `ANDROID_HOME` environment variable is not set correctly, which is required for Appium to work with Android mobile testing.
      What you've done so far:
      1. You've set the path variables for `build tools` and `platform tools`.
      2. You've followed the instructions from a video and the official documentation.
      What's missing: The `ANDROID_HOME` environment variable is not set correctly.
      Solution:
      1. Check if ANDROID_HOME is set: Open a new command prompt or terminal and type the following command:
      ```
      echo %ANDROID_HOME%
      ```
      If the output is blank or doesn't point to the correct Android SDK directory, then `ANDROID_HOME` is not set correctly.
      2. Set ANDROID_HOME environment variable:
      a. Right-click on "Computer" or "This PC" and select "Properties".
      b. Click on "Advanced system settings" on the left side.
      c. Click on "Environment Variables".
      d. Under "System Variables", click "New".
      e. In the "Variable name" field, enter `ANDROID_HOME`.
      f. In the "Variable value" field, enter the path to your Android SDK directory (e.g., `C:\Users\YourUsername\AppData\Local\Android\Sdk`).
      g. Click "OK" to close all the windows.
      Alternative method: You can also set the `ANDROID_HOME` environment variable using the command prompt or terminal:
      ```
      set ANDROID_HOME=C:\Users\YourUsername\AppData\Local\Android\Sdk
      ```
      Replace `C:\Users\YourUsername\AppData\Local\Android\Sdk` with the actual path to your Android SDK directory.
      3. Verify ANDROID_HOME is set correctly: Open a new command prompt or terminal and type the following command:
      ```
      echo %ANDROID_HOME%
      ```
      This should output the correct path to your Android SDK directory.
      4. Try running Appium again: After setting the `ANDROID_HOME` environment variable, try running Appium again to see if the error is resolved
      --

    • @tabitavadranam1808
      @tabitavadranam1808 Месяц назад

      ok thank u very much@@RaghavPal

    • @tabitavadranam1808
      @tabitavadranam1808 Месяц назад

      sir after set up iwas getting WARN AppiumDoctor ✖ android, emulator could NOT be found in D:\Android! emulator warn is but what about the android sir can u tell about this

    • @RaghavPal
      @RaghavPal  Месяц назад

      Here are a few steps you can try to resolve this:
      1. Check SDK Path: Ensure that your `ANDROID_HOME` environment variable is correctly set to the path of your Android SDK. It should look something like `D:\Android\Sdk`.
      2. Install Command Line Tools: If the `android` tool is missing, you might need to install the command line tools. You can do this through Android Studio:
      - Open Android Studio.
      - Go to File > Settings > Appearance & Behavior > System Settings > Android SDK.
      - Click on the SDK Tools tab.
      - Check the box for Android SDK Command-line Tools and install it.
      3. Obsolete SDK Tools: Sometimes, Appium requires older SDK tools that are now considered obsolete. You can enable these in Android Studio:
      - In the SDK Tools tab, check the option to Show Package Details.
      - Look for Android SDK Tools (Obsolete) and install it.
      4. Verify Installation: After installing the necessary tools, verify that the `android` and `emulator` executables are present in the `D:\Android\Sdk\tools` and `D:\Android\Sdk\emulator` directories respectively
      5. Update Environment Variables: Ensure that your system's `PATH` environment variable includes the paths to the `tools` and `emulator` directories.
      --

  • @PrajwalJorapur
    @PrajwalJorapur Месяц назад

    In my case : - X android not found it showing in appium-doctor --android.
    In first video you are getting android not found , but in second video after entering "appium-doctor --android" , android was found ,can you tell what you have done for that.

    • @RaghavPal
      @RaghavPal  Месяц назад

      Prajwal
      I may not recall. If you can give the timestamps in both video I can try to check. In general i try no step is missed. I try to record the troubleshooting steps as well. Can check again

  • @YohanesTedjaputra
    @YohanesTedjaputra Месяц назад

    Hi Raghav, thank you for you great tutorial video. Could you help me, since I'm stuck on setting emulator. Already create folder platforms, platform-tools, emulator and add it to Path. But appium-doctor still has error android could NOT be found in ! and check "avdmanager list avd" got error "Error: Missing system image for Google APIs x86_64 nightwatch-android-11."

    • @RaghavPal
      @RaghavPal  Месяц назад

      Yohanes
      Let's break down the problem step by step:
      Step 1: Verify SDK Path
      You mentioned that you've added the `platforms`, `platform-tools`, and `emulator` folders to the `Path` environment variable. Double-check that the `SDK` path is correct and points to the root directory of your Android SDK installation.
      For example, if your Android SDK is installed at `C:\Users\YourUsername\AppData\Local\Android\Sdk`, your `SDK` path should be set to `C:\Users\YourUsername\AppData\Local\Android\Sdk`.
      Step 2: Check Android SDK Installation
      Make sure you have the Android SDK installed correctly. Open the Android SDK Manager (you can find it in the `SDK` path) and verify that the following components are installed:
      * Android SDK Platform-Tools
      * Android SDK Build-Tools
      * Android Emulator
      * Android SDK Platform (at least one platform, e.g., Android 11)
      If any of these components are missing, install them using the SDK Manager.
      Step 3: Check AVD Manager
      The error message "Error: Missing system image for Google APIs x86_64 nightwatch-android-11" suggests that the system image for Android 11 (x86_64) is missing.
      Open the AVD Manager (you can find it in the `SDK` path) and create a new Android Virtual Device (AVD). Choose the Android 11 (x86_64) system image and download it. This should resolve the error.
      Step 4: Verify Appium Doctor
      Run `appium-doctor` again to see if the error persists. If you still see the error "android could NOT be found in ", try the following:
      * Check that the `ANDROID_HOME` environment variable is set to the correct `SDK` path.
      * Verify that the `platform-tools` and `emulator` folders are in the `Path` environment variable.
      * Try running `appium-doctor` with the `--android-sdk` option, specifying the correct `SDK` path, like this: `appium-doctor --android-sdk=C:\Users\YourUsername\AppData\Local\Android\Sdk`
      --

    • @YohanesTedjaputra
      @YohanesTedjaputra Месяц назад

      @@RaghavPal , thank you for you reply. Already solve the issue by installing android-30 version.

  • @DeveloperMUJIpass
    @DeveloperMUJIpass Месяц назад

    This is a great tutorial, will there be a tutorial also for iOS?

    • @RaghavPal
      @RaghavPal  Месяц назад

      Yes, can check here - automationstepbystep.com/

  • @amankrshah07
    @amankrshah07 3 месяца назад

    Hi Ragav,
    Thank you for the awesome video. I'm encountering an error and could use your help:
    " C:\Users\sabhyata>sdkmanager --list
    'sdkmanager' is not recognized as an internal or external command,
    operable program or batch file."
    I've followed all the previous steps. Can you please let me know how to fix this?
    Thanks

    • @amankrshah07
      @amankrshah07 3 месяца назад

      also i have tried the bellow step
      Microsoft Windows [Version 10.0.22631.3672]
      (c) Microsoft Corporation. All rights reserved.
      E:\android\cmdline-tools\latest\bin>sdkmanager --list
      Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
      java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
      E:\android\cmdline-tools\latest\bin>

    • @RaghavPal
      @RaghavPal  3 месяца назад

      Aman
      It seems you're encountering a couple of issues related to the Android SDK and `sdkmanager`. Let's address them step by step:
      1. 'sdkmanager' is not recognized as an internal or external command:
      - This error occurs when the system cannot find the `sdkmanager` executable in your system's PATH.
      - To fix this, you need to add the correct path to the Android SDK tools directory to your system's environment variables.
      - Follow these steps:
      - Right-click on "My Computer" (or "This PC") and select "Properties."
      - Click on "Advanced system settings."
      - In the "Advanced" tab, click on the "Environment Variables" button.
      - Under "System variables," find the "Path" variable and click "Edit."
      - Add the path to your Android SDK tools directory (usually something like `C:\Users\\AppData\Local\Android\sdk\tools\bin`).
      - Make sure to separate multiple paths with semicolons.
      - Click "OK" to save the changes.
      - Open a new Command Prompt window and try running `sdkmanager --list` again.
      2. Java Runtime Version Error:
      - The second error indicates that the `SdkManagerCli` class has been compiled with a newer version of Java than the one installed on your system.
      - You'll need to ensure that you have the correct Java version installed.
      - Follow these steps:
      - Make sure you have the latest JDK (Java Development Kit) installed on your system.
      - Set the `JAVA_HOME` environment variable to point to the JDK installation directory.
      - Update your system's PATH variable to include the `bin` directory of the JDK.
      - Restart your Command Prompt and try running `sdkmanager --list` again.
      Remember to replace `` with your actual Windows username
      --

  • @jallaboomesh
    @jallaboomesh 5 месяцев назад

    Hi Raghav, Really good explanation. Thank you very much 🙂

    • @RaghavPal
      @RaghavPal  5 месяцев назад

      You're most welcome Srinivas

  • @marwanm8942
    @marwanm8942 4 месяца назад

    you are always a rock Raghav with a high-quality tutorial 👍

    • @RaghavPal
      @RaghavPal  4 месяца назад

      Thank you so much Marwan

  • @awpshko
    @awpshko 2 месяца назад

    There is one thing has been confusing me for 2 days: appium-doctor. In your previous video and part 2 doc-file you mention "npm install -g appium-doctor" which was released 2 years ago. But in the reality you use @appium/doctor (npm i -g @appium/doctor). Both use "appium-doctor" command but 1 fails checking installation and PATHs for "--android". It will be great if you could update the doc file with this info.

    • @RaghavPal
      @RaghavPal  2 месяца назад

      Sergei
      Let's break down the issue step by step:
      Step 1: Identify the difference between the two installations
      The main difference between the two installations is the package name:
      * `appium-doctor` (old package)
      * `@appium/doctor` (new package)
      The `@` symbol in the new package name indicates that it's a scoped package, which is a way to namespace packages in npm.
      Step 2: Investigate the behavior of both installations
      The user reports that both installations allow them to use the `appium-doctor` command. However, the old installation (`appium-doctor`) fails to check the installation and PATHs for the `--android` option.
      Step 3: Determine the correct installation method
      Based on the user's experience, it seems that the correct installation method is `npm i -g @appium/doctor`. This is likely the recommended installation method by the Appium team, as it's the one that works correctly with the `--android` option.
      Step 4: Update the documentation
      As requested by the user, the documentation should be updated to reflect the correct installation method. The old article should be updated to remove the reference to `npm install -g appium-doctor` and instead recommend `npm i -g @appium/doctor`.
      Conclusion
      The correct installation method for `appium-doctor` is `npm i -g @appium/doctor`. The old package `appium-doctor` is likely deprecated and should not be used
      -