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...
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.
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 :)
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
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?
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
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)
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
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
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
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.
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
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
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
Namaste. It is what I expected. I'm in need to clarify. Timecodes will make your session better.
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...
You are awesome
great video, what about image locators?
what the difference between using ID and Xpath elements?
how to click on radio buttons. tried x path and id but it is not working.
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.
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.
how to handle the toggle button??
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 :)
Hi, I tried so much to complete the Appium set-up, but nothing's working. Can you help me with that
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
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?
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
Xpath solos
I think you skipped on find_by_accessibility_id, that would be really helpful to keep the automation code between IOS and Android same.
can't we run any native app like chrome
Hi, Can we can run some website test on android browser like chrome, firefox etc.
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)
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.
What about image locators?
Can Appium also open any app in physical mobile also without touching the mobile.
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
Can you please tell how to find element using parent child hierarchy [other than xpath]
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
@@CopeAutomation I am trying to learn appium using python .
Could u please suggest me a good place to learn?
how to fix this plss appium.webdriver' has no attribute 'Remote' (most likely due to a circular import
hi bro, appium is very slow in finding the element and entering the text...Do u have any solution for this
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
@@CopeAutomation thank you for the reply
@@CopeAutomation can u make a video on parallel testing using appium and python.... I need it for my reference... Can you make it please.
How to handle
Error: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec
please guide sir
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.
when i click on AirMirror on the Emulator it immediately crashes
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
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
Hello, can I contact you via Facebook or by mail?