Appium Automation Framework from scratch | Java | Maven | TestNG
Вставка
- Опубліковано 28 лип 2024
- FREE Courses - automationstepbystep.com/
Intro - 0:00
Step 1 : Open Eclipse 3:40
Step 2 : Install TestNG in eclipse • How To Add TestNG Plug...
• Selenium Framework for...
Step 3 : Create a new maven project 5:20
Step 4 : Add required lib/dependencies 7:31
Appium java client 8:40
Selenium java 9:50
TestNG 10:20
Step 5 : Save - Clean - Build project 12:00
Step 6 : Create 2 folders under src/test/java 12:20
tests
pages
Step 7 : User src/test/resources create a folder 14:00
apps
will keep application files (.apk, .ipa, .app)
Step 8 : Inside tests folder create a class - BaseClass 15:15
Step 9 : Create setup & teardown functions 16:00
Annotate with testng annotations
Step 10 : Add code for desired capabilities 18:25
Step 11 : Attach mobile device (or make emulator ready) 25:50
adb devices
get id and platform ver and add in desired capabilities
Step 12 : Start appium server 29:00
Step 13 : Run & test 35:55
Step 14 : Add test class and extend BaseClass 39:05
Appium Automation Framework from scratch
Eclipse Java Maven TestNG
Step by Step
Can follow on Windows & Mac
What we will do:
1. Create a java maven project in eclipse
2. Add required libraries
3. Create classes and functions
4. Add desired capabilities
5. Setup mobile device and appium
6. Create tests for mobile test automation
7. Run and test
Prerequisites:
1. Java JDK - • Java
2. Appium is installed
3. Android sdk is setup (for testing on android )
4. Xcode is setup (for testing on iOS)
5. Mobile device is ready for automation • Appium Step by Step fo...
6. Eclipse is installed
Useful Links
Element locators
appium.io/docs/en/commands/ele...
Appium API Documentation
appium.io/docs/en/about-appium...
#AppiumBeginnerTutorials
Udemy - www.udemy.com/user/raghav-pal-3/
Training by Raghav at your venue - raghav.qna@gmail.com
Training schedule - automationstepbystep.com/trai...
----------- UI TESTING -----------
Selenium Beginners - bit.ly/2MGRS8K
Selenium Java Framework from Scratch - bit.ly/2N9xvR6
Selenium Python - bit.ly/2oyMp5x
Selenium Tips - bit.ly/2owxc50
Selenium Builder - bit.ly/2MKNtlq
Katalon Studio - bit.ly/2wARFdi
Robot Framework with RIDE- bit.ly/2Px6Ue9
Robot Framework with Eclipse - bit.ly/2N8DZxb
----------- API TESTING -----------
Web Services (API) - bit.ly/2MGafL7
SoapUI - bit.ly/2MGahmd
Postman - bit.ly/2wz8LrW
General - bit.ly/2PYdwmV
Katalon Studio API Testing - bit.ly/2BwuCTN
----------- MOBILE TESTING -----------
Appium - bit.ly/2ZHFSGX
Mobile Playlist - bit.ly/2PxpeUv
----------- CI | CD | DEVOPS -----------
Jenkins Beginner - bit.ly/2MIn8EC
Jenkins Tips & Trick - bit.ly/2LRt6xC
Docker - bit.ly/2MInnzx
----------- VERSION CONTROL SYSTEM -----------
Git & GitHub - bit.ly/2Q1pagY
----------- PERFORMANCE TESTING -----------
JMeter Beginner - bit.ly/2oBbtIU
JMeter Intermediate - bit.ly/2oziNVB
JMeter Advanced - bit.ly/2Q22Y6a
JMeter Tips & Tricks - bit.ly/2NOfWD2
Performance Testing - bit.ly/2wEXbLS
----------- PROGRAMMING -----------
Java Beginners - bit.ly/2PVUcXs
Java Tips & Tricks - bit.ly/2CdcDnJ
GROOVY - bit.ly/2FvWV5C
----------- IDE -----------
Visual Studio Code - bit.ly/2V15yvt
----------- MAVEN -----------
Maven - bit.ly/2NJdDRS
----------- OTHERS -----------
Redis- bit.ly/2N9jyCG
Misc - bit.ly/2Q2q5xQ
Tools & Tips - bit.ly/2oBfwoR
QnA Friday- bit.ly/2NgwGpw
Sunday Special - bit.ly/2wB23BO
Ask Raghav - bit.ly/2CoJGWf
Interviews - bit.ly/2NIPPxk
All Playlists - bit.ly/2LSiezA
Website - automationstepbystep.com/
Udemy Courses - www.udemy.com/user/raghav-pal-3/
UA-cam - / automationstepbystep
You can support my mission for education by sharing this knowledge and helping as many people as you can
Never Stop Learning
Raghav
I feel myself lucky because of finding your channel, when I search on youtube. I m planning to watch all your videos. Thank you for your clear explanation and your effort.
Most welcome
Thank you! Your tutorials are the best of the best! I had no prior experience and i was able to install and run scrips from scratch in three days following your tutorial , Your install instructions has 100% accuracy. Here now trying some scripts.
You're welcome. Best wishes
@@RaghavPalhey raghav can we test the font size and its family for instagram app? Using appium inspector?
the best, simple, very straight forward, easy to understand tutorial! Thank you Sir!
Most welcome Seliti
Thank you Raghav .Your approach to teaching is systematic ,clear and awesome .I have learnt slenium using your videos
So glad to hear that Trellis
For who is stuck after run with test one, you should update a little bit because we are finding element of selenium webdriver instead android app:
AppiumDriver driver;
=> Update to: WebDriver driver;
driver = new AppiumDriver(url, caps);
=> Update to: driver = new RemoteWebDriver(url, caps);
Thanks for this information Tiến
Thanks Bro! You saved my day
Thanks much for the info !!
Thanks Tien... one more way it worked for me was use of direct xpath instead of name locator... "findElement(By.xpath("//input[@name='q']"))" it ran successfully..
What if we want to run with ?
Because with iOS accessibility id RemoteWebDriver is not working.
Thanks Raghav for explaining it so well in super easy steps..Kudos!
You're welcome Surendra
Amazing explanation, made the concept so easy and clear - framework from scratch. Thanks a lot for making this video. Keep making the videos and help passionate learners to reach their goals. Waiting for the Android and IOS framework videos.
Glad it helped Lakshmi
The best tutorial on framework i have gone through..
Thank raghav. keep going on
Happy to see your message Vinay. humbled
This is pretty awesome video. Excellent work Raghav on explaining details- great work. Thank you !!!!
most welcome Chandra
Very very good tutorial. Awesome work! Thank you :)
You're welcome Lucas
This is the best video i have seen till date. Very useful. The steps are very clear and explained so well. Cannot thank you much.
You are most welcome Hansita. humbled
Excellent Tutorial Raghav - Great Work !! Thank you
You're welcome Mohan
It couldn't be any easier... Loved it.. Thanks Raghav ::)
Glad to hear that Tanisha
Raghav you have explained it very well. Thanks for the good work.
You're welcome Rahman
Excelente trabalho. Obrigado pela dedicação do seu tempo.
Muito bem-vindo
I just would like to say thank you for these videos, you are helping me so much.
You are so welcome Emanuel
Amazing tutorial very well explained!!! Thank you so much for the video!!
Most welcome Jack
Thank you Raghav pal, your explanation gives us confidence In our selves to perform exceptionally well at interview thanks a lot Raghav
You're welcome Sai
superb Explanation and get knowledge in Appium, Keep going on thanks for your effort
You're welcome Samson
wow, you create Appium step by step too, thank you Raghav
Hi Novanto, sure, you can find all courses here - automationstepbystep.com/
very useful videos and thank you for all your efforts, i have problem finding TestNG part one. thanks again
Hi Mahmood, you can check the complete playlist here - automationstepbystep.com/
Very very cool and interesting .Thank you very much!
You're welcome jiejun
Your explanation looks like god-level bro. Seriously !. Before your tutorial I don't know how to use appium. Now I hope I'll get a good job in QA. Thanks for your precious video bro. Thank you.
So happy and humbled to see your message Giridhar
Sir your explanation is very clear as well as while presenting your screen is very clear .Thanks Sir.
You're most welcome Smita
great description, I have solved my problem...
Happy to know Amandeep
Below is the solution worked for me for exception/error "No Chromedriver found"
Start appium server through command line using below command:
appium --allow-insecure chromedriver_autodownload
The above command will install the latest driver as per the chrome browser version on running the above test as expected.
Thanks for the inforamation Akbar
Thanks Bro!
Thank you so much !
Thanks Akbar !
Where we have to put this Command??
Great explanation nice and clean. Thanks
You're welcome Athar
Thank you so much for this amazing tutorial ! very well explained in vedio and fully all things covered for beginners. Please, make vedio on diff types of exceptions / errors / challenges are getting while creating framework as well more suggestions on Appium automation framework.
Hi Bhushan, sure, I will do
this is fantastic !!
Thanks for watching
Thank you Raghav ! I am a Subscriber and will request for more Videos on Appium Frame work specially on Pages of POM.
I will do Himadri
Hi Raghav, I have been searching alot for some good tutorials on Automation using Appium and Maven and I finally came across your videos - Very well laid out and explained. Thank you so much for helping us get a good grasp of the concepts.
I have a few doubts:
1. I used pom to define my dependencies- appium java client, selenium and tetng jars and built the maven application. Now when trying to go to AppiumDriver or AndroidDriver class, I get an error mentioning that the JAR file has no source attachment I couldnt find the path too to mention. How do I go about resolving that as I am interested in exploring the classes in some jar files.
2. When setting the below capability (basically instantiating the ChromeDriver), I am getting the below errror-
No Chromedriver found that can automate Chrome '58.0.3029'
Glad to know it helped Divya.
1. You can provide the location of your jar. Check here - stackoverflow.com/questions/15180411/attach-the-source-in-eclipse-of-a-jar
2. You will need to get chromedrive exe ver as per the ver of chrome browser on your system
Thank you Raghav ,
Really nice video , I always waiting for your next video .
You're welcome Kunal. Thanks for watching
@@RaghavPal i want to learn how to provide data from Csv file .
I will try to add a video, meanwhile you can check this video that will help you
ua-cam.com/video/CV3SOorFydE/v-deo.html
ua-cam.com/video/02ANy2pu_ZA/v-deo.html
@@RaghavPal :)
Very good tutorial on Appium, nice explained
Glad you liked it
Awesome Tutorial....................
Thanks for watching Mahesh
Thanks raghav. you are doing great work . can you continue doing framework on appium and testproject.
Thanks Pavan. Sure will continue.
Amazing, amazing, amazing.. I am short of words
Thanks a lot Khhyati.. humbled
Very good. Thanks for sharing.
You're welcome Fazle
Thank you Raghav....you help me a lot..
So nice of you Zulfiqar
Thank you, so much. God bless you!!!
You are so welcome!
easy to understand..the way u explains
Thanks Raushan
Very nicely explained. Thanks
You are welcome
Hi, can I know which one is best to do automation. Katalon or by how u show it in this video ? Because I try to use katalon it is not that flexible to select the specific elements when it is comes to app
Hi Sharmilah, Katalon mobile testing is also based on Appium, it has some wrappers and gui over appium, although it's not very mature yet.. I will suggest go this way of creating your custom framework for mobile testing.
When i created a maven project getting error in pom.xml file
when clicked on that error shown like this not able to check this
Multiple annotations found at this line:
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to collect dependencies at
org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 -> org.apache.maven:maven-toolchain:jar:1.0 -> org.apache.maven:maven-core:jar:2.0.6 ->
org.apache.maven:maven-project:jar:2.0.6 -> org.apache.maven:maven-artifact-manager:jar:2.0.6: ArtifactDescriptorException: Failed to read artifact descriptor
for org.apache.maven:maven-artifact-manager:jar:2.0.6: ArtifactResolutionException: Failure to transfer org.apache.maven:maven-artifact-manager:pom:2.0.6
from repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed
or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-artifact-manager:pom:2.0.6 from/to central (
repo.maven.apache.org/maven2): The operation was cancelled.
- CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: PluginResolutionException: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved:
org.apache.maven:maven-plugin-api:jar:2.0.9, org.apache.maven:maven-artifact:jar:2.0.9, org.codehaus.plexus:plexus-utils:jar:1.5.1, org.apache.maven:maven-
core:jar:2.0.9, org.apache.maven:maven-settings:jar:2.0.9, org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9, org.apache.maven:maven-
profile:jar:2.0.9, org.apache.maven:maven-model:jar:2.0.9, org.apache.maven:maven-repository-metadata:jar:2.0.9, org.apache.maven:maven-error-
diagnostics:jar:2.0.9, org.apache.maven:maven-project:jar:2.0.9, org.apache.maven:maven-plugin-registry:jar:2.0.9, org.apache.maven:maven-plugin-
descriptor:jar:2.0.9, org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-toolchain:jar:1.0,
org.apache.maven.shared:maven-shared-utils:jar:0.1, org.apache.maven.shared:maven-shared-incremental:jar:1.1, org.codehaus.plexus:plexus-compiler-
api:jar:2.2, org.codehaus.plexus:plexus-compiler-manager:jar:2.2, org.codehaus.plexus:plexus-compiler-javac:jar:2.2, org.codehaus.plexus:plexus-container-
default:jar:1.5.5: Failure to transfer org.apache.maven:maven-plugin-api:jar:2.0.9 from repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact
org.apache.maven:maven-plugin-api:jar:2.0.9 from/to central (repo.maven.apache.org/maven2): The operation was cancelled.
Is there any solution for this
Eclipse Version - 2020-06 (4.16.0)
Hi Lakshmi, try to update maven project
Rt click > Maven > Update > Force Update
stackoverflow.com/questions/39926064/coreexception-could-not-get-the-value-for-parameter-compilerid-for-plugin-execu/41416449
Thank you it was very easy and clear
Most welcome Zarif
Hi Raghav, Thank for such a nice explanation. One query - What is the use of src/main/java and src/main/resources. Please help as I need to create a framework in my project for POC purpose. Thanks in Adance.
Hi Kapil, these are diff folders or packages. You can put your main dev code in src/main/java, your test-related scripts under src/test/java and other resources like config files, drivers, property files etc in resources
Hi Raghav,
Which eclipse version your using, There is no testng plugin for the latest eclipse version.
Hi Seshadri, I used 2018-12 ver. Pls check this video - ua-cam.com/video/yyUyi8s42dE/v-deo.html
Hi please how did you setup the output folder where all the report are stored, am using Junit and in the baseTest how will I use @AfterSuite
Hi Ifeoma, pls point the time in the video so I can refer quickly
Hi Raghav,what about folder which we created pages and apps folder,in the above video its just created thats it no code/content added ..
Hi Ateeqh, the apps folder is to add your apk or ipa files for mobile applications and pages will contain class with element locators to create Page Object Model. I mentioned this here - ua-cam.com/video/UlktcBntD6s/v-deo.html
for Page OBject Model - this will help - ua-cam.com/video/-0F-YBAQdGE/v-deo.html
Complete Appium - ua-cam.com/play/PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk.html
Hi Raghav! Can you please let me know where to write implicit wait command in the bdd framework for Android apps? I have written after androiddriver initialisation but it is throwing an error.
Hi Akash, what is the error, You can also google it for instant help
Hi, I've been following along in Java and the tests seem to run and pass, however, when running two tests, it doesn't even wait for the browser to load the results of the first search before moving on to the second test.
I have "cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 60);" in my code, but is there a different or specific way of waiting between tests? Not sure what else I can try and new to coding so unsure where I would put any wait commands.
Any help would be appreciated.
Hi, ideally, implicit wait at global level and page load timeouts should be sufficient, In case there is a particular step that needs some wait with condition, you can try explicit or fluent waits
Thank you very much!!!!!!!! You are the best :)
You're welcome!
37: 52 the test-output folder was created when you executed the test, its like the results of the test. Will I get the same test-output folder if am using Junit.
Yes, pls try
Hi, thanks for making the videos..really helped me alot in my testing journey.
Is adding the appium.io dependency the same as appium studio? I need to use some functionality to simulate the camera, i don't think appium does this
since im doing this for mobile app automation, I do not need the selenium dependency?
Hi Hwei, you can either add appium dependency in your project or use appium studio
Hi, I got pass results after I run as TestNG, but the browser from the mobile failed to launch.
Pls check the logs for troubleshooting
Hi Raghav, i get "org.openqa.selenium.SessionNotCreatedException" when i run calculator tests, i have configured and set environment variables for JAVA, SDK, platform tools, tools, adb device also connected can u pls guide me how to resolve..
Hi Mohan, pls check appium server is running. And only one instance should be running. You can stop and start the server again and check. Also see this - stackoverflow.com/questions/32048031/org-openqa-selenium-sessionnotcreatedexception-a-new-session-could-not-be-creat
hello the adb devices command does not work in the latest version of macos and I can't seem to find an alternative
will need to check on this Kashif
Thank you so much I have learned so much from this alone, this best explanation so far. One request for you If you could share this project with us. That would be a great help.
Thanks could you please share it with us.
Pls check this - github.com/Raghav-Pal/AppiumDemoProject
Error: Could not find or load main class org.testng.remote.RemoteTestNG
what can i do for above error message
Hi Ashok, check this - stackoverflow.com/questions/32943504/error-could-not-find-or-load-main-class-org-testng-remote-remotetestng
Good one!
Can you help me on this please, I see adb is not recognized in command prompt when i search for adb devices. I have verified the system variables and also path, adb is placed inside platform-tools.
Hi Muhthar, Pls check if you have set path of adb in env variables (system variables)
Pls check this : stackoverflow.com/questions/8744758/adb-is-not-recognized-as-internal-or-external-command-on-windows
Hi
I am no route found.setting content type to text/plain in appium and if I type the URL in google it is showing the url '/hd/hub' did not map to valid resource
Can you please tell how to clear the error
Hi Rashmi, pls check if this helps - stackoverflow.com/questions/44410681/the-url-session-did-not-map-to-a-valid-resource-how-to-run-desktop-applicat
Awesome Tutorial !!!
Thanks for watching
Hi,
After launching appium inspector , i am not able to tap on particular elements, its showing interaction are not available for thia element, and at left side it captured the screen but not able click any text field or button
Device mac
App calculator
Hi Shiva, There may be some elements hidden or inside frames, You can check the properties and DOM and try to create a locator, Can take online help too
I have some doubts as mentioned below.
1. I have added dependency which you are added in this video, but I'm unable find MobileCapabilityType java file.
2. I couldnot able to declare thar appium driver variable. Unable to proceed after this
Hi Pradeep, will need to check the logs and error details, Can try some online examples
Where did the appium server come from? Did it come along with the appium java-client dependency? Or did you install it separately?
along with appium
Hi Raghav, It seems the video link for adding "TestNG to eclipse" is redirecting to some other youtube channel. Please check
Thanks for letting me know Sowmya, I have updated
How to automate android apps using VPS without VT virtualization? is there any custom images?
thanks
will need to check on that
Thank you for the tutorial Raghav. May I know if you have the same tutorial for Native app. I mean setting up the TestNG framework with android or ios native apps.
Hi Vinay, yet to do on native apps
Automation Step by Step - Raghav Pal please Raghav can you make more videos on Appium .
very good knowledge and tutorials
Glad you think so!
Thanks Raghav, this is Amazing session.
Can someone explain what is in driver initialiation step?
Hi Ankush, this is a class in Appium library, can check more here - discuss.appium.io/t/difference-between-webelement-mobileelement-androidelement-and-ioselement/5254
Hi Raghav, I am getting "Error: Could not find or load main class org.testng.TestNG" when i am trying to to do Run As- TestNG. Can you please help me here? Also i had added TestNG dependencies already
Hi Aditya, pls check if this is path related issue, Check here
stackoverflow.com/questions/17894938/getting-error-could-not-find-or-load-main-class-org-testng-testng#:~:text=Possibly%20your%20testng.,%3A%5CWorkspace%5Cprojectname%5Clib%20.&text=Check%20that%20the%20lib%20folder%20contains%20testng%2D6.8.&text=jar%20(or%20any%20other%20version)%20with%20the%20jars%20that%20gets,when%20we%20add%20TestNG%20library.
can i use page factory model in appium like we i can use for web testing
Yes, we can do Hassan
In web automation we used to write .xml config file right. Here mobile automation not required that approach?
Suresh
In web automation, XML configuration files are often used to manage settings and parameters for test frameworks like Selenium. However, in mobile automation with Appium, the approach can be different. Appium typically uses desired capabilities, which are a set of key-value pairs that define the context of the test run. These capabilities can be written in JSON format and included directly in your test code or in a separate JSON file.
Here's an example of how desired capabilities might look in a JSON file for an Appium test:
```json
{
"platformName": "Android",
"platformVersion": "11.0",
"deviceName": "Android Emulator",
"app": "/path/to/your/app.apk",
"automationName": "UiAutomator2"
}
```
You would then load these capabilities in your test setup. For instance, in Java, you might use the `DesiredCapabilities` class to load them:
```java
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "11.0");
capabilities.setCapability("deviceName", "Android Emulator");
capabilities.setCapability("app", "/path/to/your/app.apk");
capabilities.setCapability("automationName", "UiAutomator2");
AppiumDriver driver = new AndroidDriver(new URL("127.0.0.1:4723/wd/hub"), capabilities);
```
This approach is different from traditional web automation, where XML configuration files might be used more extensively. In Appium, JSON is preferred for defining capabilities because it is more concise and integrates well with the programming languages commonly used for writing tests (like Java, Python, etc.).
Hi Raghav thank you agin for this courses.
I faced an issue which was => "No Chromedriver found that can automate Chrome '81.0.4044'"
I fixed by adding this deviceCap in the Setup() => caps.setCapability("chromedriverExecutable", "C:\\ChromeDrivers\\81.0.4044.138\\chromedriver.exe");
What I'm looking for is way to skip this step. There's such thing ?
Thx
Hi Haider, If you add the path of the chromederver.exe in Path env variable, you may try to skip this
Hi Raghav, I follow this tutorial but get "Exception in thread "main" java.lang.UnsupportedClassVersionError" when running the TestNG . I am using javac 20.0.1 and java 20.0.1, selenium 3.141.59, java-client 7.0.0, and testng 7.8.0. I am trying to find the solution for this since yesterday but still cant solve this issue. The terminal log said nothing bout this error.
Nadia
The error message "Exception in thread "main" java.lang.UnsupportedClassVersionError" means that the Java Virtual Machine (JVM) is unable to load the class because it is not compatible with the version of the JVM that is running.
This error can occur for a few reasons:
* The class file was compiled with a newer version of Java than the JVM is running.
* The class file is corrupt.
* The JVM is not configured to run Java 18.
To troubleshoot this error, you can try the following:
* Check the Java version that the class file was compiled with. You can do this by looking at the file header of the class file.
* Check the Java version that the JVM is running. You can do this by running the following command:
```
java -version
```
If the Java version that the class file was compiled with is newer than the Java version that the JVM is running, then you need to compile the class file with the older version of Java.
If the class file is corrupt, then you need to delete the class file and recompile it.
If the JVM is not configured to run Java 18, then you need to update the JVM configuration.
I hope this helps!
Thank you Raghav,
Is there any ios emulator for windows?
No Azam, there may be some tools or frameworks that may help but windows does not have any iOS simulators
Hi Raghav, I am facing an error :Process finished with exit code 255 ,org.testng.TestNGException: (in IntelliJ),can you help me to fix the error
Hi Sowmya, can check this
stackoverflow.com/questions/27654407/automated-test-fails-on-button-click
You may need to do some more online search to find a final solution
getting an error, Google isn't helping.
java.lang.UnsupportedClassVersionError: Preview features are not enabled for tests/BaseClass (class file version 58.65535). Try running with '--enable-preview'
Any ideas?
Hi Mizoto, what is your java version. I was checking this online and may be this is with java 9
You may try to use a diff ver and check, In case you want to know how to install or update java, can find in my playlist on java under programming section here - automationstepbystep.com/
@@RaghavPalMy Java version is 14
@@RaghavPal I found it out.
Right click project > properties > Java Compiler> set compliance level to 1.8.
Then it worked
Glad to know this
Thanks for reply i have viewed your complete playlist but still i am feeling its not enough.Can you please upload a project tutorial so that a lot of queries would be resolve
Sure Hassan, I will plan to make a more detailed project video. You can also check existing here - automationstepbystep.com/
Can you use one driver for both android and iOS or is their a work around ? or is it not possible to write 1 test for android and iOS
Hi Sidney, you will need to do some changes in Desired Capabilities, Can put this in a condition
your english is really good
I am improving.
Excellent :)
Thanks Nataraj
Thanks Raghav for these videos.. Very informative..
Will java 17 supports appium? Can I install java 17 to work with appium?
Hi Tejaswi, I could not find any official documentation for Java 17 for appium, you can try with latest JDK and check,
Please am trying to test mobile using Appium but am using Pulse to connect to my office network, please how do I set it up
Hi Ifeoma, not much info on Pulse as of now. Will need to check some online examples
Why AppiumDriver is showing error even though i have put library ,can anyone help me
Hi Rupam, what is the error, check other comments on this video, you may find the solution
Thank you very good tutorial !!!!!!!!!
You are welcome!
Hi Raghav, first of all Thank u so much for the wonderful lectures, Please help me as while executing I am getting ""TestNG by default disables loading DTD from unsecured URLs. If you need to explicitly load the DTD from a http url, please do so by using the JVM argument [-Dtestng.dtd.http=true]" error.. please help
Hi Anti, check this stackoverflow.com/questions/57299606/testng-by-default-disables-loading-dtd-from-unsecure-urls
Hi Raghav, your video tutorials are very helpful and Thank you very much !!! Could you please do a tutorial on how to do automation testing on react native/native mobile apps? Is it differ from Android/iOS automation testing ?
Noted! I wil try
Thank you!
how can we continue to automate test2 method on same screen?
can continue in the same session, do not close browser or app
Hi Raghav, I wanted to ask you something: In order to perform automation with appium and Java & Selenium for Apple devices you will need an Mac machine? Is it possible to perform this under Windows machine? Thanks for your great work.
Hi Gabriel,
In order to perform automation testing with Appium and Java & Selenium for Apple devices, you need a Mac machine. This is because Appium relies on Apple's XCUITest automation framework, which is only available on macOS. Therefore, if you want to automate testing on Apple devices, you will need a Mac machine to run Appium.
While it is possible to write the code for Appium using Java & Selenium on a Windows machine, you will not be able to execute the tests on an Apple device without a Mac machine. However, there are a few workarounds that allow you to perform testing on a real iOS device without a Mac machine. These include:
Using a cloud-based testing service that provides access to real iOS devices for testing. Examples of such services include Sauce Labs, BrowserStack, and Firebase Test Lab.
Using a third-party tool such as CrossBrowserTesting's Appium Studio, which provides an emulation of XCUITest on a Windows machine.
Using a virtual machine running macOS on your Windows machine. This requires you to have a licensed copy of macOS and access to a virtual machine software such as VMware or VirtualBox.
However, these workarounds may have limitations in terms of performance, reliability, and device compatibility, so it is recommended to use a physical Mac machine for Appium testing on Apple devices.
@@RaghavPal Thank you Raghav, I really appreciate your long explaining and devotion to teach!
Awesome Tutorial 👍👍 can you please tell me how can we do automation testing in Perfecto ??
I will plan on that Prateek
Great work
Thanks for watching Bhavya
Hey Raghav.. Very nice sessions.. they help a lot in our work .. thank you so much. I have a question.. can we automate the apps in the mobile which are inside citrix workspace?
It can be tricky Shilpa, Try some online examples on this
@@RaghavPal ok.. tq so much for the reply...it is actually knox workspace.. will browse the web.. but it is possible right?
Yes, most probably, you may have to setup within the machine where app is running
@@RaghavPal ohh ok.. will try it out.. tq..
Hi sir ,Thanks for doing this Amazing content .
sir is this Framework enough to build and automate my live mobile applications ??
Yes Krishna, this will help you create the framework, and then you can build and add on top of it as per your needs and application requirments
Hi Raghav, I am getting the below error . Could you please help?
An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome '69.0.3497'
Thanks
Hi Hrushikesh, If you are doing browser testing on chrome, you will need to add chromebrowser driver
Hi iam getting this error while executing maven project in Appium desktop "[W3C] Encountered internal error running command: Error: Could not find 'aapt' in ["/usr/local/share/android-sdk/platform-tools/aapt"
Hi Arun,
aapt.exe is the Android Asset Packaging Tool and is part of the Android SDK. Can you confirm that you have aapt.exe somewhere on your machine? There are specific directories that the script is looking in to find it. You might want to try reinstalling the Android SDK.
I was reading some posts that aapt.exe may be named aapt2.exe for some SDKs. Could you check to see if that file exists on your system? You should be able to find it in:
C:\Users\\AppData\Local\Android\sdk\build-tools\
If it does exist, you might be able to create a shortcut named “aapt.exe” to that file.
forum.katalon.com/t/could-not-find-aapt-exe/10922/10
A user solved it using below steps:
1 I installed Android Studio and
2 installed SDK from Android Studio.
export ANDROID_HOME=/Users/darya1/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
3 Edit the configuration setting of Appium server to point to the ANDROID_HOME and JAVA_HOME.
Do junit framework support ios mobile automation framework? Can you please confirm.
Hi, JUnit is a unit testing framework, you can create unit tests for any of your application.
Hi Raghav Sir.. I need your help to understand where should I use interface and Abstract class while working on automation framework..?? Actually even when I know the definitions of Abstract class and interface while working alone on my automation framework I am not getting how can I bring Abstract class and interface in framework.. I follow Page object model.. pls help
I will try to create a session Surbhi, for now pls try online help
Thanks alot..
Hi Raghav,
I am getting following error can you help on this.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find 'aapt' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
Hi, aapt.exe is the Android Asset Packaging Tool and is part of the Android SDK. Can you confirm that you have aapt.exe somewhere on your machine? There are specific directories that the script is looking in to find it. You might want to try reinstalling the Android SDK.
I was reading some posts that aapt.exe may be named aapt2.exe for some SDKs. Could you check to see if that file exists on your system? You should be able to find it in:
C:\Users\\AppData\Local\Android\sdk\build-tools\
If it does exist, you might be able to create a shortcut named “aapt.exe” to that file.
forum.katalon.com/t/could-not-find-aapt-exe/10922/10
A user solved it using below steps:
1 I installed Android Studio and
2 installed SDK from Android Studio.
export ANDROID_HOME=/Users/darya1/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
3 Edit the configuration setting of Appium server to point to the ANDROID_HOME and JAVA_HOME.
Hi Raghav, can you plz provide the link for how to test on a native mobile application?
I Srisha, all videos are in this list - ua-cam.com/play/PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk.html
Thank you to you real good job! I tested with a native app it's has been working 1 times but after that i had an error : "dump failed because no AndroidManifest.xml found" in Appium logs... Did you know why please? Thank you by advance.
Hi AJ, this may be the app file issue. Pls check stackoverflow.com/questions/16590629/error-dump-failed-because-no-androidmanifest-xml-found
github.com/appium/appium/issues/12587