Automate Mobile application using Appium Selenium
Vložit
- čas přidán 21. 08. 2024
- This video will help you to automate mobile native and hybrid application using Appium and Selenium Webdriver.
This video will cover download, install and run test on android devices.
Same article published on my blog
learn-automatio...
~-~~-~~~-~~-~
Please watch: "How To Create Maven build For Selenium Framework"
• How To Create Maven bu...
~-~~-~~~-~~-~
Mukesh sir, I always feel happy whenever i see your videos thank you very much for beautiful guidelines and give us right track in our professional life......sir one thing u just requesting you please make video to how to find xapth in andriod as well as in ios too..Thanks sir
Thanks Mukesh. Really appreciated for your clear and concise tutorial
Thanks Sarker. Keep learning
Thanks for sharing Mukesh! Really appreciate it! Pretty clear, concise and well-structured tutorial :)
+Diana Lorena Ortiz Libreros thanks Diana I am glad you Liked it.
Keep watching and let me know if any help from my side. 😊
Mukesh otwani sure! I will looking for you :)
Hi Mukesh, Thanks Mukesh for posting videos for Appium.Please post the video for Appium Testing Framework
Will upload soon
Thanks Mukesh, Its very helpful and easy to understand. I have watched all videos related to Appium selenium. Everything is working fine. waiting for you upcoming videos like how to find element and xpath , please post soon. Thanks a lot!!!!!!
Hey great :) sure will upload soon.
Hi Mukesh,
I am a big fan now for mobile automation after seeing these videos. :D
Please upload the next videos soon...
Hey Gaurav, yes will upload soon.
Thanks for sharing this video and make us understand in simple way..
Thanks Reena I am Glad you liked it.
@@Mukeshotwani give me some tips to learn more and understand it becoz I really wanted to ...
Brilliant stuff Mukesh! Loved it! Thank you!
Thanks Gupta ji
Hi Mukesh, great video, thanks a lot. :)
I have two queries:
One, We haven't used GenyMotion yet. Does it work the same way as real device does?? Can you show how GenyMotion works?
Two, I saw you ran the tests using TestNG, is it possible to show viewers how TestNG is configured with your project(also, what kind of project do you begin with, i assume it to be a standard java project.)
Your reply would help me and others a lot.
Thanks .
--Piyush
Hey Piyush,
1- GenyMotion works slow as compared to real device.
2- For TestNG learn-automation.com/how-to-install-testng-in-eclipse/
Thanks Mukesh. Very helpful for beginners.
Thanks Sri
sir pls upload a tutorial on selenium IDE....I really love ur explanations regarding all the testing tutorials
Hi Gaurav IDE is not used widely in the market but will upload soon.
+Mukesh otwani ....thanks a lot sir
Good explanation. I want to try the same with Ruby instead of Java. Can you please help me on the same. basically i want to write a small prm in appium using ruby.
happy birthday bhai ... :)
Hello Mukesh,
Thanks for the videos, they are very helpful.
Can you please show how to launch an app that is already installed on a phone like Twitter, Facebook, WhatsApp ect.
Also if you can post some videos on usage of AndroidDriver as well?
That will be very helpful.
Thanks.
could you please let me know how to use xpath in appium
+thomas chacko Hi Thomas please follow below 2 link which will help you.
toolsqa.com/mobile-automation/appium/findelement-and-findelements-commands/
software-testing-tutorials-automation.blogspot.in/2015/10/ui-automator-viewer-get-android-app.html
Hi Mukesh.. Thanks for sharing this video. It´s amazing. Could you share the pom (or just the dependencies) and maven repository url for that java code mentioned in this video?
HI mukesh, can know how to locate elements, is there any video? Plz let me know
For mobile I dont have. I will upload soon.
Hello. Great video congratulations. One doubt, is it possible to use selenium on real devices, using for example the firefox driver in headlles mode? Do you have a video about it? Thank you.
Awesome...thanks Mukesh
Hello, very good tutorial, thanks for buying.
I have a query, it is possible to measure or capture the response time it takes to load the objects, I need to validate that the objects appear but also how long they take to appear.
Thank you so much.
Which one is best for Android and iOS mobile automation?I am looking for an common automation framework for minimal maintainance.Could you please suggest me.I am new to mobile selenium automation.
When I write AndriodDriver driver then eclipse giving warning "AndroidDriver is a raw type. References to generic type AndroidDriver should be parameterized"
+Ravi Nelluri It is warning u can skip.Basically it is asking which type of driver you want to instantiate
Hello, I am new to automation and you tell me that eclipse I need to download in order to run this test. Thank you
Hi Diana kindly use Eclipse neon and use below link to download Eclipse
www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/2/eclipse-jee-neon-2-win32-x86_64.zip&mirror_id=448
Hi Diana,
Did you get the solution?
Good...very helpful for beginners
mukesh...can u Plz explain how to connected physical device using genymotion
+Santhosh C Hi Santosh for real device no added security,,
hey man your videos are awsm, waiting for xpath videos.
Thanks Madhur
Android Settings option not available in Appium Server
Hi Roopa new appium server has different UI. Setting option is present but with few option rest everything you have to write in code
Hi Mukesh, i have gone through the tutorial but after running the test i am not able to click any button on the device app, but the getText() method is working fine. I am using Appium desktop, Selenium standalone server 2.51.0, Java client 5.0.0 Beta9.
Hi Mukesh,
can we automate non-web based mobile application by Appium like any mobile game or we want to do some change in our mobile setting so can we do it..?
@mukesh when i am running my code system generates an exception like that org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -jar "C:\Program Files (x86)\Appium
ode_modules\appium
ode_modules\appium-adb\jars\sign.jar" C:\Software\selendroid-test-app-0.17.0.apk --override" can you help me to reslove this issue ?
Good job brother
Thanks Usama :)
Hey Mukesh, I am facing one prob. If I am using driver.hideKeyboard(); command, then the appium gets unresponsive and doesn't click on any element after that
For iOS devices. Do I really need an Apple machine to run this or can I use a virtual machine on Windows running Mac OS X?
Yes XCode wil work with MAC
@@Mukeshotwani But will it work with MacOS virtual machine on Windows 10?
no you need MAC for XCode
@@Mukeshotwani Thanks
Hii Mukesh
Is it mandatory to whenever we want to execute test case in mobile testing we have to install application every time. it means can we run our test case without again installation of application. means can we run on previous installed application . plz help me .
Thank you .
I am getting success message while running the command as "adb install ". But I could not see application installed in my device
Hi Ram check device permissoin
@@Mukeshotwani ok..I got the solution. Thanks!!
Hi @Mukesh otwani
Any plan for videos to inspect element and get locators for apps?
Thanks
Not planned yet but will try my best to upload soon.
Hi Mukesh.... how to identify or inspect the element for android if any other video then please do provide the link
Hi Uday i dont have any video as of now but will create soon. You might get some other tutorials on this.
Hi Mukesh, how can I pass headers like user agent to mobile emulator launched with Webdriver?? I tried with capabilities but it doesnt work.
Sorry I did not get your question.
thanks.very help full for me .please uplaod next video xpath videos
Yes Lahari will upload soon.
In my setup, the Appium does not populate the Activity and Package Name . Also i dont have an edit option to populate it myself. The Drop down is blank. ? Can you please suggest me here .
Hi Mukesh,
Thanks for this very helpful video.
Can you please tell me the software you used to cast the device on the system .
Hey Abhishek I used Vysor Chrome extension and app
Hello Mukesh,
Thanks for the video this helped me a lot. I just have a question here. whenever we launch the app will it be reinstalled again? I tried to launch the app the device ID is getting reset.
+Abhishek M S In appium we have option you can select no reset and then run the test.
Thanks Mukesh it worked.
Cheers
How did you take the xpath on mobile app?
using UiAutomateViewer
Hi Mukesh,
can you make a tutorial on how to use the Appium inspector and grab the element locators, so that we can easily grab the elements and write some test scripts for better tool interaction and knowledge...
That is my next video is all about location in Appium.
+Mukesh otwani Great, we will be waiting for it...
Hi Mukesh,
I tried to connect my android device using PdaNet. it is connecting but I am not able to see virtual device in my laptop. I mean in your tutorials you are showing us by performing actions on virtual mobile screen. how Can I do that? can I use team viewer? or any other tool you can recommend to me please.
Hi +Mukesh otwani, Thanks for the superb tutorial.
I followed the same step for testing Whatsapp but it reinstalled my Whatsapp every time I tried thus i am unable to test the same.Can you please guide me on that??
Hi Suraj you can select this option from appium then it will not install again.
Thanks Mukesh.Can you guide me on that please how to do so.
Hi mahesh sir, why we need team viewer? what is the purpose? and you directly installed the app through command prompt, can we do through code?
Is you written startapplication.java file...or it will be generated automatically
We have to write manually
Hi mukesh , I am now stuck at choosing the apk fie path in the android setting page. I ha stopped the appium server on installing the app as you have told, still these check boxes are disabled for me.
Hello Mukesh , nice video. I just want to know the link for video in which you have explained about DesiredCapabilties and setting them up. Can you share the libk?
Hi Ahmed you can check video number 3 for DesiredCapability. czcams.com/video/4RiieiylcnU/video.html
How are you inspecting element.. I don't see a video of yous for that..are you using uiautomatorviewer?
Thanks a lot bro..:) amazing video
Hi Sachin thanks keep visiting..
Hi Mukesh,
Have you posted about how to get the xpath and id of the elements ? I want to know about it.
please make more videos on this.
Sure Raveena I will try to upload more videos on this
Hi Mukesh when i try to run the CMD command i get "adb is not recognized as an internal or external command, operable program or batch" please advice
hi mukesh..can u please mention the simulator tool u used for the devices
+Mahender Tirumala Hi Mahender it is GenyMotion
www.genymotion.com/
every time i run the application it shows the permission popup which is not getting solved by mobileBy, capabilities also....any clue to disable that?
Hi Sir in this example you not told how can get Xpath for editText and id for click
Hi Rahul, yes I have not created video on that.. I will do soon.
Hi Mukesh,
I am facing a issue in appium. After open application by appium, it throw a error message "org.openqa.selenium.remote.ProtocolHandshake createSession", and suddendly execution stops after open app. How to solve this issue ?
Hi Mukesh
Its a very informative video Thank you so much and while working in eclipse what are the jars we have to import and
I need some more info on what is .apk file and what we have to download from selendroid site
Please reply ASAP Thank you
+Siva rama krishna Ryali Hi Siva I have covered installation part in this video please refer part 1 and part 2 czcams.com/video/eRddxh-4u5k/video.html
Ya This is fine and can you upload a video on how to find Xpath for mobile application
Thanku
yup will do soon.
Could you please tell me the name of the software that you are using to simulate your phone in your computer?
Hai sir
i facing the error "An element could not be located on the page using the given search parameters"
i use Xpath,id,class name but that element same error coming
please give me any solution
Hi Sudhir for which application.. Can you share step details?
sir my application is android APK
MobileElement el8 = (MobileElement) driver.findElementById("com.mobile.producersonline:id/btnFavorite");
el8.click();threed(2000);
in this process i using Xpath,id,classname.but no getting result
hi mukesh, which is the emulator device, did u seperately installed this device? here you run the test from eclipse using run as java application,so how eclipse configured to run this,can we run test from cli.
Can u pls help in launching simulator for iphone via code ( selenium) then proceeding with testing. No manually launching appium
Mukesh do you have any video around security testing using selenium + zap ? I would really appreciate if you can upload.
Which software is best for display mobile screen on laptop.?
Hey Mukesh when I type adb install c:/... Selendroid.apk in command line. The response is "adb server didn't ack *failed to start daemon error:"
Hi Thabiso Can you try with different APK file?
@@Mukeshotwani Hi,
once the application path chosen
clicked on start
again back to the android settings package to wait for activity is not populating automatically...
please help
hi mukesh
My appium test shows passed but no click action is performed. i have made complete setup ok but still why this happening
I am running Appium server (Version 1.2.0-beta.1) on Mac and do not see option for Android Settings as you have shown in the video to provide Selendroid apk path. Can you help please?
Hi Vijay, Kindly use Appium Desktop to get all settings.
I have only Mac machine. Is that a limitation then?
Hi mukesh, can we do iOS native app testing using appium. Can you pls guide me.
Hi Mukesh,
please share video for finding locators in Appium
Could you please share a link to the video for finding locators of the native app in Appium ??
thanks a ton for this. When are you going to upload next video? Please upload it soon.. :)
Yes Saurabh will upload soon.
Hi Mukesh,
Could you please tell me how to inspect elements in my Hybrid application.
Hi Naga this will help toolsqa.com/mobile-automation/appium/how-to-inspect-and-automate-webview-in-hybrid-app/
Thank you Mukesh for your reply .... :)
Now I am able to launch the App(Android). Now I want to maintain my test scripts in order. So I need a framework. Do you have any video for sample framework. It will really help me...
You need to specify at least one testng.xml, one class or one method
Usage: [options] The XML suite files to run
Options:
-configfailurepolicy
Configuration failure policy (skip or continue)
-d
Output directory
-dataproviderthreadcount
Number of threads to use when running data providers
-excludegroups
Comma-separated list of group names to exclude
-groups
Comma-separated list of group names to be run
-junit
JUnit mode
Default: false
-listener
List of .class files or list of class names implementing ITestListener or
ISuiteListener
-methods
Comma separated of test methods
Default: []
-methodselectors
List of .class files or list of class names implementing IMethodSelector
-mixed
Mixed mode - autodetect the type of current test and run it with
appropriate runner
Default: false
-objectfactory
List of .class files or list of class names implementing
ITestRunnerFactory
-parallel
Parallel mode (methods, tests or classes)
Possible Values: [tests, methods, classes, instances, none, true, false]
-port
The port
-reporter
Extended configuration for custom report listener
-suitename
Default name of test suite, if not specified in suite definition file or
source code
-suitethreadpoolsize
Size of the thread pool to use to run suites
Default: 1
-testclass
The list of test classes
-testjar
A jar file containing the tests
-testname
Default name of test, if not specified in suitedefinition file or source
code
-testnames
The list of test names to run
-testrunfactory, -testRunFactory
The factory used to create tests
-threadcount
Number of threads to use when running tests in parallel
-usedefaultlisteners
Whether to use the default listeners
Default: true
-log, -verbose
Level of verbosity
-xmlpathinjar
The full path to the xml file inside the jar file (only valid if -testjar
was specified)
Default: testng.xml
getting this error please how to sort out
Hi Mukesh , now a days appium inspector is not working in windows machine, please make a video for that issue
hi Mukesh,
Could you please tell me how do i create a bat file to integrate this in jenkins?
if possible please share the batch file
right now i am starting appium thru node and not able to move further with test cases..it is stoping there :(
Hi Mukesh, I am unable to find the .apk file for the selendroid-test-app. I have downloaded the app but when I try to run the install command it says no .apk file and in the folder I am not finding .apk file. Can you please tell me if I am missing something here.
Hi mukesh, can you please tell me how to scroll element in dropdown and dropdown is present in popup using appium
What is the phone emulayor youbuse at the beginning of the video
It was genymotion and that time it was free but seems its paid tool now. You can use Android AVD now.
@@Mukeshotwani ok thx
I have a question I would like to answer
When I extract an code appium to Apk, can I share it
Please help me
Sorry Kamal I didn't get your question.. can you explain in detail?
thank you Mukesh for your response , I want to know if I export my apk, Can I use it in other real devices.
- because we use appium server with local host, are these devices should be connected to the appium server if yes how?
- because I want to use my apk in other devices which is not connected to my pc, will my apk work in these devices.
Thank You So Much My Brother For All Your Efforts.
Hi Mukesh! hope you r well! can you please tell me, how does the "testscript" in eclipse interact with the real device? do i have to add any plugin of pdanet to the eclipse? please explain. Thanks
Hey Vijay Appium will take care of this if you will provide device id. Kindly check below video for code and explanation
Hello mukesh, i am working in Appium 1.4.16.1 and i am getting error :[ Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity.] i tried to find solution but not satisfied yet, plz help me to resolve this issue.
Hello Master
I need something like Appium in automating android apps
The problem with me I don't want all these steps to get starting playing my code like linking Nox or Emulator with Appium and so on
Mukesh can you please make videos on latest appium version. If you have time
I was getting error by adding activity and package name.used following method
capabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "io.selendroid.testapp");
capabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "io.selendroid.testapp.HomeScreenActivity");
to find packagename and activity without using appium(new version of Appium does not have setting option)
use following command in command prompt
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
in result first will be the package name and second one as activity name.
Hi Mukesh,
'Package' and 'Launch activity' are not generating when added the app path in the application path and pressed the start Appium server.any thing to do after this step?
+pradeep Hi Pradeep if not coming then check with developer to provide or use below article.www.toolsqa.com/mobile-automation/appium/how-to-find-apppackage-and-appactivity-for-apk-file/
Hi Mukesh, Can you please post videos Appium using Javascript that would be great
Thanks in Advance!
Hello, Can you please Send me link of the video where you have explained hot to get the locaters and write Xpath in Appium please
Good Video #fundootesters
how to connect the device and how i can set to see it like you the screen of the device on my pc? you skip that important part
@Mukeshotwani can this run multiple threads?
hi mukesh please upload more videos or Appium finding xpath
hey mukesh, when I run a code it show me error in console like
Exception in thread "main" org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
and in terminal program interrupt at
.....
[debug] [W3C] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP]
hi mukesh,how to inspect the elements and find locators for selendroid app
hi mukesh,i have installed whole setup and unable to run native app can u pls guide me
Hi mukesh I am not able to add application path, Appium emulator not allowing me
Hi Mukesh thank you for the video, But I am facing an issue here, even after launching the appium server, wait for packages and other tabs are still blank they are not getting populated, kindly help me with this issue
+Praveen Avr Hi Praveen try below link www.toolsqa.com/mobile-automation/appium/how-to-find-apppackage-and-appactivity-for-apk-file/
Hello Mukesh,
I am facing one major issue which has become a major bottleneck to move ahead in our automation testing project.
When ever we are trying to launch the browser or any app using appium script - it is asking for the verification - if we try to launch browser it is aking for login. When we launch an app like WhatsApp - it is asking to enter the phone number for verification. We've tried all the options like in appium settings we've put no reset(enabled this checkbox). Even then no luck. Please help us with this.
We are using mobile device of android version 4.4.2.
Waiting for you reply.
Hey Fay you can refer below video for this czcams.com/video/f2bD86ugJ3M/video.html
Hi Mukseh,
Can u tell me the software name how to see mobile screen on the PC
TeamViewer
Hi Mukesh, What is the exact software you have used to connect to your mobile device in this particular video, it doesn't look like a TeamViewer like you have shown in your previous video?
Not sure what it is by Vysor can be used; and to me it looks like Vysor only.
Hello mukesh! can you please tell how you have simulated real device?
I cant able to install chrome browser on genymotion virtual device so...
+subodh rajbhandari Hi Subodh try default browser in GenyMotion.