How to locate an Element in Appium Python | Appium Locator strategies

This video demonstrates the different locator strategies in Appium. Follow this series for more videos

Пікірлер: 47

  • @kutsokon
    @kutsokon Жыл бұрын

    Thanks you helped me a lot :) i was dealing with about 7 different phones simulator 3 days in a row, but now i exactly found it

  • @abgouri9813
    @abgouri98134 жыл бұрын

    Hey, the explanations are very clear like a blue sky. Liked it. Could you help understand how to deal with duplicate elements without using XPATH / dynamic xpath.. May be using uiselector...

  • @viacheslavgurov4371
    @viacheslavgurov4371 Жыл бұрын

    Namaste. It is what I expected. I'm in need to clarify. Timecodes will make your session better.

  • @WaldoTheWombat
    @WaldoTheWombat3 жыл бұрын

    great video, what about image locators?

  • @sarthakmahapatra9002
    @sarthakmahapatra90022 ай бұрын

    You are awesome

  • @hukkemaaruspetus787
    @hukkemaaruspetus7875 жыл бұрын

    how to click on radio buttons. tried x path and id but it is not working.

  • @arun53413
    @arun534134 жыл бұрын

    Thank you so much, this is very helpful. You are also covering additional tips on pycharm shortcuts and methods, really helpful. But I've a problem : 1. I installed Android Studio but in cmd -> 'android' command is not working. Getting something like below: C:\Users\Admin>android ************************************************************************** The "android" command is deprecated. For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat ************************************************************************** Invalid or unsupported command "" Supported commands are: android list target android list avd android list device android create avd android move avd android delete avd android list sdk android update sdk So I think, because of this in Appium am not able to invoke the app successfully, getting error like below: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path. But all my path variables are set. Please , any one help me and unblock me from this.

  • @abiprakash21m
    @abiprakash21m4 ай бұрын

    what the difference between using ID and Xpath elements?

  • @NiteshSharma-qt5gi
    @NiteshSharma-qt5gi5 жыл бұрын

    Hi Cope, One quick question, This app installs in my phone after running this script but after installing the app it doesn't do anything no click nothing.. and when i check in pycharm it says code executed (0) seems like it stops after installing the app.. any suggestions?

  • @sachinjoshi5211
    @sachinjoshi52114 жыл бұрын

    Nice Videos , I have noticed that the send_keys method doesnt work with certain type of elements , The error is selenium.common.exceptions.InvalidElementStateException: Message: Cannot set the element to 'sachin joshi'. Did you interact with the correct element? I see that many people have reported the same issue but i dont see any real solution , Any response will be helpful . Thank you in Advance :)

  • @geetumodi691

    @geetumodi691

    2 жыл бұрын

    Hi, I tried so much to complete the Appium set-up, but nothing's working. Can you help me with that

  • @shrishailh278
    @shrishailh2783 жыл бұрын

    How exactly we can navigate directly to user settings page in Facebook instead of clicking on menu then user settings? Like driver. Get functionality in selenium

  • @creatur
    @creatur3 жыл бұрын

    Can we make a application to do all this automation (like open calc and do things). I mean cam we make a apk by all of this program files.

  • @ks653
    @ks6535 жыл бұрын

    Hey Cope, 2 doubts : 1. Using ID over Xpath and Class is preferable ? 2. I tried the same scripts, but after clicking not null, my script goes to Search bar again and types LL

  • @saintqirex3655

    @saintqirex3655

    2 жыл бұрын

    Xpath solos

  • @Mr767267
    @Mr767267 Жыл бұрын

    I think you skipped on find_by_accessibility_id, that would be really helpful to keep the automation code between IOS and Android same.

  • @developers_hub
    @developers_hub Жыл бұрын

    can't we run any native app like chrome

  • @danithomas_
    @danithomas_ Жыл бұрын

    how to handle the toggle button??

  • @darwintech5920
    @darwintech59203 жыл бұрын

    how to fix this plss appium.webdriver' has no attribute 'Remote' (most likely due to a circular import

  • @RajeevKumar-cf4er
    @RajeevKumar-cf4er4 жыл бұрын

    Can Appium also open any app in physical mobile also without touching the mobile.

  • @filipgajic93

    @filipgajic93

    4 жыл бұрын

    It can, you can set it like this: First, you need to start appium, you can do it from the GUI or from CMD simply by typing "appium" Make sure your device is connected with PC and enable USB debugging and file transfer. "appPackage" and "appActivity" -> you can find with: Apk Info application: play.google.com/store/apps/details?id=com.wt.apkinfo&hl=en Create a new .py file and input following, for example: from appium import webdriver desired_cap = { "deviceName": "HUAWEI Mate 20 Pro", "platformName": "Android", "PlatformVersion": "10", "appPackage": "app package name-> copy from Apk Info app", "appActivity": "app activity name-> copy from Apk Info app" } driver = webdriver.Remote("localhost:4723/wd/hub", desired_cap) PS: localhost can vary, mine is 4723 buy yours can be different, just change the number

  • @vikramvikki4265
    @vikramvikki4265 Жыл бұрын

    What about image locators?

  • @sourabhahuja2382
    @sourabhahuja23824 жыл бұрын

    Hi, Can we can run some website test on android browser like chrome, firefox etc.

  • @TomThomasVempala

    @TomThomasVempala

    4 жыл бұрын

    yeah you can this is my code: from appium import webdriver desiredCap={ "deviceName": "emulator-5554", "platformName": "Android", "appPackage": "com.android.chrome", "appActivity": "com.google.android.apps.chrome.Main", "noReset": True, "automationName": "UiAutomator2" } driver=webdriver.Remote("localhost:4723/wd/hub",desiredCap) driver.implicitly_wait(30) searchbar=driver.find_element_by_id("com.android.chrome:id/search_box_text") searchbar.send_keys("Batman") driver.keyevent(84)

  • @creatur

    @creatur

    3 жыл бұрын

    Can we make a application to do all this automation (like open calc and do things). I mean cam we make a apk by all of this program files.

  • @sanyal27
    @sanyal274 жыл бұрын

    Can you please tell how to find element using parent child hierarchy [other than xpath]

  • @CopeAutomation

    @CopeAutomation

    4 жыл бұрын

    Hi, Unlike Selenium's CSS selectors, there are only limited options for Appium and again the strategy varies based on the device. For Android, please explore this option to see if you can use any of these: developer.android.com/reference/android/support/test/uiautomator/UiSelector

  • @sanyal27

    @sanyal27

    4 жыл бұрын

    @@CopeAutomation I am trying to learn appium using python . Could u please suggest me a good place to learn?

  • @PriyankaRamachandra
    @PriyankaRamachandra Жыл бұрын

    I am not able to get find_element_by_id() instead it shows only find_element() and find_elements() . Can you please help me out how to use this for ID. I am not getting any proper reference.

  • @Blindman65169

    @Blindman65169

    Жыл бұрын

    find_element_by_ got deprecated. To get the same effect, you'd use find_element where the first argument is By.ID

  • @WaldoTheWombat
    @WaldoTheWombat4 жыл бұрын

    when i click on AirMirror on the Emulator it immediately crashes

  • @Diepali
    @Diepali4 жыл бұрын

    How to handle Error: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec please guide sir

  • @vanitawashington2183

    @vanitawashington2183

    4 жыл бұрын

    The same thing is happening to me. When I tried to use Appium with ApowerMirror, the device is disconnected from the computer (there are no adb devices for Android). I switched to another Apower product called LetsView and Appium worked.

  • @surajkumar-to5zh
    @surajkumar-to5zh4 жыл бұрын

    hi bro, appium is very slow in finding the element and entering the text...Do u have any solution for this

  • @CopeAutomation

    @CopeAutomation

    4 жыл бұрын

    Hi, The slowness could be due to various reasons application rendering, internal API calls turn around time and so on. There isn't any direct way to fix it until otherwise you introduced any delays

  • @surajkumar-to5zh

    @surajkumar-to5zh

    4 жыл бұрын

    @@CopeAutomation thank you for the reply

  • @surajkumar-to5zh

    @surajkumar-to5zh

    4 жыл бұрын

    @@CopeAutomation can u make a video on parallel testing using appium and python.... I need it for my reference... Can you make it please.

  • @ishan1701
    @ishan17013 жыл бұрын

    I am trying to perform the same with an app. The app is getting opened on the emulator but not proceeing further. selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.**myApp**'' application. Visit github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: '*.SplashActivity' or 'com.**myApp**.*.SplashActivity' never started. Visit github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting

  • @WaldoTheWombat
    @WaldoTheWombat4 жыл бұрын

    You can add this do your Json (your dictionary) to allow all permissions and to keep Appium from resetting the app when it runs it each run. "autoGrantPermissions": True, "noReset": True

  • @The_Night707
    @The_Night7073 жыл бұрын

    Hello, can I contact you via Facebook or by mail?