Katalon Studio 20 - How to do Mobile (android) Testing on Windows with Katalon Studio | 8 STEPS
Vložit
- čas přidán 23. 08. 2024
- All FREE courses - automationstep...
Today we will learn
1. How to install Node.js
2. How to install Appium
3. How to setup Android device (mobile) for automation
4. Connection and Validation
5. Run TestCase on mobile
Step 1 : Check if Node.js is already installed
node -v
node --version
npm -v
npm --version
Step 2 : Download and install Node.js
nodejs.org/en/...
check node.js is installed by running the above commands
node -v
npm -v
where node
Step 3 : Install APPIUM
check Java is installed on your system
java -version
npm install -g appium
npm install -g appium@1.5.2
Check if appium is installed
appium --version
appium -v
where appium
Step 4 : Open Katalon Studio and connect to Appium
Step 5 : Setup android mobile device for automation
1. Settings - About Phone - tap 7 times on Build number
2. Settings - Developer Options - enable USB Debugging
Step 6 : Connect android device to your system (usb cable)
In case USB options NOT showing in android when connected to PC but phone charges • USB options NOT showin...
Step 7 : Run the sample mobile test project
Step 8 : Create a new test and try mobile recording
Run and Validate
References:
nodejs.org/en/...
docs.katalon.c...
appium.io/
____________________________________________________________
Katalon Studio Beginner Tutorial Playlist
• Katalon Studio
Like on Facebook - / automationstepbystep
Subscribe on:
CZcams - / automationstepbystep .
.
_______ ONLINE COURSES TO LEARN _______
Visit - automationstepb...
----------- Follow -----------
Facebook - / automationstepbystep
Twitter - / automationsbs
CZcams - / automationstepbystep
This is a really good tutorial !!!
Everything is so clear (and a lot of important details)
thank you very much !!!
Hi Adriana, so happy to see this message
Thank you Raghav, You're the best teacher in my opinion
So humbled to see your message Novanto
solid content, especially the last section, explained all components, a very good learning material for beginner
Glad it helped Alex
thank you! I was trying to apply job that required katalon as main tools, this tutorial help me a lot!
Glad it helped!
The way he explained all the err on the way of each installed just excellent
Happy to know Sukanya
hi, new in using katalon studio and appium, I get the error as 'Unable to start the remote session. Unable to start the application' on my 2nd and succeeding runs. What might be the issue?
npm 6.14.13
appium 1.21.0
node.js 14.7.0
jdk 16.0.1
please advise
Hi Makoi, can be device or application issue, just try using diff ones
Super video. I automated my flutter and kotlin app using this video. It's really helpful. Thanks for the video
Great to know this
Hey bro!
Thanks for your awesome video but unfortunately I'm am stuck in an error which is happening every time I try to start mobile recorder the error says: "Unable to create a new remote session. Please check the server log for more details. original error: Could not find a driver for automationName 'uiautomator2' and platformName 'android'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Could not find installed driver to support given caps)"
I can't able to solve this problem kindly help me regarding this problem.
This error typically occurs when the Appium server can't create a new session because it can't find a driver that supports the automationName 'uiautomator2' and platformName 'android'. Here are a few steps you can try to resolve this issue:
1. Upgrade Appium: Make sure you have the latest version of Appium installed. You can upgrade Appium using npm (Node Package Manager) with the command `npm install -g appium`
2. Check Installed Drivers: Run the command `appium driver list --installed` as suggested in the error message. This will list all the drivers that are currently installed. Make sure that a driver for 'uiautomator2' and 'android' is installed
3. Appium Server Restart: Try restarting the Appium server. Sometimes, a simple restart can resolve the issue
4. Session Override: If you're starting Appium as a node process, you can give the option '--session-override true'. This would avoid this problem
5. Katalon Studio and Appium Version Compatibility: Ensure that the versions of Katalon Studio and Appium you're using are compatible. Some users have reported that using Katalon version 6.1.x and Appium version 1.8.0 works
6. SDK Tools: Download the SDK tools from the Android developer site and put the downloaded file to `C/user/.katalon/tools/sdk-tools`
Remember to replace the paths and versions with your actual paths and versions. If the problem persists, please check the server logs for more details as suggested in the error message. The logs might contain more information about what's causing the issue.
I hope this helps
---
Amazing tutorial! Thanks for all the explanations.
You're welcome Eduardo
Wow!! Incredible bro. Amazing video and very informative. Thanks a lot. Ur, absolutely a Teacher by Passion. Keep up the good work.
So nice of you
Step by Step clarity... Thank You sir ji
Most welcome
Fantastic tuturials in general. Thanks in advance. Did you have any example of how to simulate camera intent with file image on Katalon, for example over adb command?
Hi João, no idea on this
Hello , I don't have java installed on my system , could you please help me if any specific version of java would be required ? also javac would come default if I just install java
& Thanks for such a useful session , yet so clear and easy to understand for anyone
Hi Anjali, any ver 8 and above should work for java. If you get JDK javac should come, but don't worry on that, just install JDK and then start
Java on Windows - czcams.com/video/FqpmH8MVO6A/video.html
Java on Mac - czcams.com/video/NSvtis2fGlA/video.html
Sure ,not a problem ,I have completed my setup yesterday itself & executed the sample project , will start exploring using new Apk's today
Thanks a lot :)
Really a great video, highly recommended, sir iam eagerly waiting for emulator video for same. if u could explain on how that changes and how to set up it through android studio in katalon. pleassssse sir make that video early as possible. or can u pls explain it here since iam need it urgently, have searched in so many sources, didnt helped.
I will check on this Shreya
Thank you! Very informative and clear.
You're welcome
Very useful and very easily explained by you.
Thanks Pallishree
Hi Raghav. Your channel is very usefull dan very helpfull. Clearly step by step. Anyways, I have issue in appium directory in katalon. What should be put in katalon preferences if i installed appium via gui because its not creating any file/folder under folder npm.
Hi Yunus, if you installed through GUI, still there will be some location where it's stored. Of course not under npm. On windows cmd try running command : where appium
Or search online for : appium installation directory on windows
Dude can you make video about how to make a test case etc for the mobile apps? i appreciate the video but im very hard time how to test an app from the playstore
I will try on that Axel
Hi Raghav - Nice explanation, is there any video to generate *.apk keys? because i don't have an option to run sample project and need to do native apps testing for my app on real device...
Thanks in advance
Hi Mohideen, you can find some apps on PlayStore that can help
Hi Raghav,
Thanks a lot for this wonderful video. Is there any video of yours with testing on mobile emulator?
Hi, I have used simulators for iOS, but not yet for android
pretty much interesting and i appreciate your way of explaination
Thanks for watching Faheem
Hi Raghav I don't know how to do to fin option (about phone) on my Iphon, and how to connect it with Vysor? can do a video for this please thanks a lot
I will try to add a session on that.
This was really helpful. Thank you!!
Most welcome Charana
Thanks for this! Very informative!
Glad it was helpful Rubica
Thx for information.. im from Indonesia try learn with your youtube.
Glad to know this Erick. Keep learning.
thank you, this is reaaally helpful :)
Hi there, I liked this tutorial. But there is one issue which is being coming when I am navigating to Katalon->Run-> Android. Any idea as to how we can resolve it:
"It appears that you dont have node js installed or set up correctly". Please note that every thing is being perfectly installed on my system. Kindly help if you can. THanks in advance.
Most probably you may not have installed node at the default location, where katalon is trying to find it, you can add the location of node js in your Path env variables and try again
Hi Rahul ... excellent start up guide for beginners. But this is too basic. Don't know how to proceed further :-( Please add more videos to Android app testing using Katalon. Create a new playlist for Appium as well.
I will add more videos in some time
Thank you Sir for all your efforts.
Welcome Tariq
Halo Raghav,, i just watched your video and stuck in minute 19.50. there is nothing happen in my device and how to connect our device to vysor, and vysor to katalon. Please Help!!
Elsa
I used Vysor only to show my mobile screen on desktop.. you may not need it.. can work without Vysor
Hi Raghav,
Using Katalon can i combine Desktop/API with Mobile app Automation steps in an single test case.
Yes, you can
Niz & very useful video..Thanks for making tutorials......Plese, do more......
You're welcome. I will do
Glad to get the first view on this video Raghav it is a very useful and informative video, I would request you to please create a new playlist on appium as there are very few tutorials on Appium
Thanks for watching Keshav, I will definitely do that soon
Raghav I am waiting for it because I want to learn Appium from you only thanks for your support and encouragement
Will soon start on it
Hello sir,
Can you please explain me how I get my full mobile screen device in device view in katalon studio
Hi Akanksha,
Sure! Here are the steps to get your full mobile screen device in device view in Katalon Studio:
Open Katalon Studio and create a new mobile testing project.
Click on the "Mobile" tab at the top of the screen, then click on "Device Viewer".
In the Device Viewer window, select your device from the dropdown list.
In the bottom-right corner of the Device Viewer window, click on the "Maximize" button. This will expand the Device Viewer to fill your entire screen.
If your device is not displayed in full screen mode, click on the "Fit to Screen" button in the top-right corner of the Device Viewer window.
You can also adjust the orientation of your device by clicking on the "Rotate" button.
That's it! You should now have your full mobile screen device in device view in Katalon Studio. You can use this view to interact with your device and record test scripts.
Hi Raghav, if we can do Mobile testing in KS then y we need to do seperately in programming languages? Could you clear this doubt?
Hi Rajesh, there are multiple platforms that support mobile testing, Some of them are free, open-source, commercial etc. and they provide diff features. So this depends on your needs, budget, preferences etc. You can do mobile testing by creating a custom framework from scratch or can use platforms like katalon studio to avoid doing all the setup and framework creation.
@@RaghavPal ok Raghav. Now I am in one confusion please say your suggestions as soon as possible. Currently am working in startup company and only 2persons for testing including me and doing manual and automation testing. Automation in RPA Uipath tool now the thing is I want to do Mobile testing for our mobile app I am the only person already knew java selenium my colleague doesn't know about selenium who he is basically penetration tester so which tool to select to do Mobile testing and my company is not interested to purchase any paid tool only open source tool so please suggest me Raghav am waiting for your valuable reply...
Hi Rajesh, for free tools you have option Appium and Katalon Studio. With Appium you will need to create and setup your own framework, and will have complete conrol over it. I am currently creating Appium playlist. czcams.com/play/PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk.html
You can also check with katalon. You should do a POC first and then decide
thank you for sharing sir, i love this channel so education
Thanks a lot for watching Okta
Excellent content, thank you for share with us.
You're welcome Thiago
Hi Sir, should we download the Api Demos application in our mobile?
You can download or just use from your system, as shown in the video
Thanks for this videos
but i have a question:
If I have an application already on my device, how do I open it?
Hi Bảo
You can provide appPackage and appActivity of the application in Desired Capabilities. Check this - forum.katalon.com/t/how-to-launch-an-installed-app-using-katalon-studio/15468/4
docs.katalon.com/katalon-studio/docs/mobile-start-application.html
I am pretty new on Mobile testing. and I am using Katalon. When I enter username and password there is no button to click enter. So how can I perform enter function ,after putting the credentials when there is no enter or go button ?
Can simulate keyboard enter press
Sir thanks for previous reply
An important thing i want to ask sir
Issue is i recorded a test case a week back android.
But when i play today so it fails and gives no specific error in log.
Can you please help...
Hi Rakesh, not sure if logs do not give any information, Check the setup
Hi Raghav, i can't seem to find the vysor extension, is there other similar and safe extension to simulate this?
You will not need Vysor, I used it only to show my mobile screen on desktop for the viewers
Hi Raghav, Thanks for the video. I have a doubt, Can we automate iOS mobiles on Windows pc
if you are using remote cloud devices, then you can, for using local, physical devices, you cannot as of now
@@RaghavPal Okay I get it Thanks for the reply 🙂
Any videos for configuration of a emulator device like android studio to katalon
Hi, not yet, will do it soon
javac -version
'javac' is not recognized as an internal or external command,
operable program or batch file.
will it be a problem?
Hi Mariam
The error message "javac is not recognized as an internal or external command, operable program or batch file" means that the javac command is not available on your computer. This can be a problem if you are trying to compile Java code.
There are a few reasons why the javac command might not be available on your computer. One possibility is that you do not have the Java Development Kit (JDK) installed. The JDK is a software development kit that includes the javac compiler.
Another possibility is that the javac command is not in your computer's path environment variable. The path environment variable tells your computer where to find executable files. If the javac command is not in your path environment variable, you will not be able to run it from the command line.
To fix the error message "javac is not recognized as an internal or external command, operable program or batch file", you need to install the JDK and add the javac command to your path environment variable.
Here are the steps on how to install the JDK:
1. Go to the Oracle Java SE Development Kit website and download the latest version of the JDK for your operating system.
2. Run the installer and follow the instructions.
3. Once the JDK is installed, you need to add the javac command to your path environment variable.
Here are the steps on how to add the javac command to your path environment variable:
1. Open the Windows Control Panel.
2. Click on "System and Security".
3. Click on "System".
4. Click on "Advanced system settings".
5. Click on the "Environment Variables" button.
6. In the "System variables" section, double-click on the "Path" variable.
7. In the "Edit environment variable" dialog box, add the path to the JDK bin directory to the end of the "Value" field. For example, if the JDK is installed in the "C:\Program Files\Java\jdk1.8.0_201" directory, you would add the following path to the "Value" field:
```
C:\Program Files\Java\jdk1.8.0_201\bin;
```
8. Click on "OK" to save your changes.
Once you have added the javac command to your path environment variable, you should be able to run it from the command line without any errors.
Hey Raghav I stuck in a functionality for Katalon Mobile app testing. In my app when I am Enter the Integer value app automatically displays the $ symbol.
So when I am entering the integer value with "Set Text" option it returns error message as "Invalid name! A file name must start with English letters or numbers, and can mixup with Space or any of the following characters..."
So please suggest what is the solution for that.
Hi, I saw some discussion over this here
forum.katalon.com/t/rename-file-invalid-name-a-file-name-must-start-with-english-letter-or-numbers-and-can-mix-up-with-space-or-any-of-the-following-characters/45075
github.com/katalon-studio/katalon-studio/issues/382
May have to check more for a proper solution
Hi, Raghav, Thanks for your tutorial video. Actually, I can't found directory .katalon\tools\platform-tools , I found the folder .katalon but it doesn't contain any folder tools like you mention in this video, any guide will be very helpful
Hi Asti, we basically need adb application to check the devices connected. You can also get it separately online.www.xda-developers.com/install-adb-windows-macos-linux/
Hi your video is really good but im getting this error (Appium directory is invalid: Cannot find appium executable) i dont know what to do
Hi, pls check if the appium folder location is added properly in Katalon Studio forum.katalon.com/t/appium-directory-is-invalid-cannot-find-appium-executable/8772
excelente video tutorial. muchas gracias por compartirlo :)
You're welcome Pamela
@@RaghavPal Thank you very much for valuable videos sir , i did the installation of Desktop - appium client version 1.17 but it was not showing in cmd while running while " where appium " so i installed appium from CLI now its showing in cmd but I am not able to run the test its showing error" Could not connect to server; are you sure it's running?" , kindly guide me with solution thanks in advance
Sir, I had a problem so I followed your steps and downloaded the latest version and I also setup Katalon, but when I run it, the error message appeared "com.kms.katalon.core.appium.exception.Appium Start Exception: Fail to start Appium server in 30 seconds"
I've tried everything on the media but it doesn't work. I wonder if you can help me?
version my setUp:
- node -v : v18.17.1
- node --version : v18.17.1
- java -version : java version "1.8.0_381"
Java(TM) SE Runtime Environment (build 1.8.0_381-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.381-b09, mixed mode)
- appium -v : 2.1.3
Alfin
Here are few points to help you troubleshoot the error message "com.kms.katalon.core.appium.exception.AppiumStartException: Fail to start Appium server in 30 seconds".
Here are some things you can try:
1. *Make sure that Appium is running.* You can do this by opening a terminal window and running the command `appium`. If Appium is running successfully, you should see a message like this:
```
Appium server started successfully on localhost:4723
```
2. *Make sure that Katalon Studio is configured to use the correct Appium server address.* You can check this by going to *Project* > *Settings* > *Execution* > *Mobile*. Under *Appium Server*, make sure that the *Host* and *Port* fields are set to the correct values.
3. *Try restarting Appium and Katalon Studio.* This can sometimes fix minor glitches.
4. *Increase the Appium server start timeout.* You can do this by going to *Project* > *Settings* > *Execution* > *Mobile*. Under *Appium Server*, increase the value of the *Default wait for Appium server timeout (in seconds)* field.
5. *Check the Appium server logs for errors.* The Appium server logs are located at `.appium/logs/appium.log` on your computer. If you see any errors in the logs, you can try to fix them or search online for a solution.
If you have tried all of the above and you are still getting the error message, please provide me with more information about your setup, such as the operating system you are using and the specific steps you are taking to start Appium and Katalon Studio.
Here are some additional tips for troubleshooting Appium server startup problems:
* Make sure that you have the latest version of Node.js and Java installed.
* Make sure that you have the Appium server installed in the correct location.
* Make sure that you have the necessary ports open. The default Appium server port is 4723.
* Make sure that you are not running any other programs that are using the same port as the Appium server.
* Try restarting your computer.
If you are still having trouble, please post a question on the Katalon Studio forum or the Appium community forum.
Hi Raghav
I am unable to join since in the payament part I have used multiple debit card but it is not taking and giving error as "correct this card info or change the card" so help me in joining ur forum
Hi Mohan, you can try getting support from CZcams or check here - support.google.com/youtube/answer/6304294
Hi Raghav, thank you for your tutorial, it has been incredibly helpful. I do have a couple of questions though:
1. In the step where you install Appium and check its location, you mentioned it should be inside the Roaming folder. However, on my system, it isn't located there. Is this okay, or should I move it to the same folder as yours?
2. I encountered an error that seems to be related to a driver not being installed. Could you please help me resolve this issue?
Caused by: 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 a driver for automationName 'uiautomator2' and platformName 'android'. Have you installed a driver that supports those capabilities? Run 'appium driver list --installed' to see. (Lower-level error: Could not find installed driver to support given caps)
Thank you so much!
Lia
Let's address your questions:
1. Appium Installation Location:
- The default installation location for Appium may vary based on your system and how you installed it.
- In Katalon Studio, you can manually set the Appium directory by following these steps:
1. Open Katalon Studio.
2. Go to Windows > Katalon Studio Preferences > Katalon > Mobile settings.
3. Set the Appium Directory to the folder where Appium is installed.
- By default, Appium is usually installed at `C:\Users\{your_login_account}\AppData\Roaming
pm
ode_modules\appium` on Windows².
- If your installation location is different, that's okay. Just make sure to specify the correct path in Katalon Studio.
2. Driver Issue:
- The error message you encountered indicates that the required driver for `uiautomator2` and `android` is missing.
- For Appium 2.x and above, you need to install the drivers separately (such as XCUITest, UIAutomator2, and espresso).
- To resolve this issue:
1. Ensure you have installed the necessary drivers (especially for Android) using Appium's command line:
```
npm install -g appium
```
2. Verify that the Appium Directory in Katalon Studio points to the correct location where the drivers are installed.
- If you're still facing issues, consider checking the server logs for more details and running `appium driver list --installed` to verify the installed drivers
-
@@RaghavPal Thanks a lot, your suggestions solved the issue. Thanks!!!
How to resolve unable to create new remote session in katalon studio mobile testing. Can you please help to resolve the issue
Renuka
To resolve the "unable to create new remote session" error in Katalon Studio for mobile testing, you can try the following steps:
1. Upgrade Appium Server Version: Ensure you are using a compatible version of Appium with Katalon Studio. Upgrading to the latest version might resolve compatibility issues.
2. Remove Outdated Server Tests:
Remove the outdated server tests from your device using the following commands:
```shell
adb uninstall io.appium.uiautomator2.server.test
adb uninstall appium.uiautomator2.server
```
3. Delete and Re-download Android SDK:
Delete the existing Android SDK folder located at `C:\Users\\.katalon\tools\android_sdk` and allow Katalon to download it again upon the next execution.
4. Check SDK Tools:
Download the SDK tools from the official Android developer site and place the downloaded file in the `C:\user\.katalon\tools\sdk-tools` directory. Make sure to back up the old folder before making changes.
5. Appium Version Compatibility:
Switch to a different version of Appium if the current one is not working. Versions 1.8.0 or 1.8.1 are suggested as they have been reported to work well.
6. Katalon Studio Version:
Use a compatible version of Katalon Studio. Versions 6.0.x or 6.1.x are recommended.
7. Check WebDriverAgentRunner:
If you're testing on an iOS device, ensure that the WebDriverAgentRunner is installed and trusted on your device. You may need to remove the current WebDriverAgentRunner and reinstall it.
8. Review Server Logs:
Check the server logs for more details on the error. The logs might provide specific information about what is causing the session creation to fail.
Hello sir, your videos are really impressive.Recently I started to learn katalon Studio.when I am starting the mobile testing it is showing some warning.it is showing an unknown server side error occurred while processing the command. Please give solution.
Hi, will need to see the detailed logs, Pls also check other similar comments on this video, you may get some inputs
Hi raghav, Actually I use to test mobile applications and I can't find videos that you did for Appium before, can you please provide us some videos training of Appium for application mobile thanks a lot.
Hi Zouina, I am yet to do on Appium, will do soon
It record successfully all steps but when play than in mobile the app intiate from very starting .set user enter mobile no. And test failed .what to do
Hi Rakesh, check what the logs say
Hi Raghav, I have one question. Suppose I have recorded mobile test on physical device and want to run it using KRE / TestOps so in that case Script will run on which device. Please guide me
Hi Prem
When you record a mobile test on a physical device using Katalon Studio and want to run it using Katalon Runtime Engine (KRE) or Katalon TestOps, the script will run on the same device on which you recorded the test
The recorded test script captures the interactions and actions performed on the specific device during the recording. When you execute the script using KRE or TestOps, it will be executed on the designated device that was used during the recording
It's important to ensure that the device is connected and available for execution when running the script. You can specify the device details, such as device ID or UDID, in the execution configuration to ensure that the script runs on the intended device
If you want to execute the test on multiple devices, you would need to create separate test executions for each device or use test orchestration tools provided by Katalon TestOps to distribute and execute the test across multiple devices simultaneously
@@RaghavPal Thank you
father of automation is here guys
Humbled by your message Yosua
Hi,
thank you for cool guide! But I have a problem with recording flutter app. When I try to set text into the EditText i get the error messege "com.kms.katalon.composer.mobile.recorder.exceptions.MobileRecordException: org.openqa.selenium.InvalidElementStateException: Cannot set the element to '8888888'. Did you interact with the correct element?". Is there any solutions?
Hi, I have not exactly tried on a flutter application, however there have been several new features to handle StaleElementException, we have smart wait, auto-healing etc. I will suggest to have some wait time and also enable auto-healing - m.czcams.com/video/1Fy3jU-XGm4/video.html
Also check with the Katalon team or support forum
Wonderful Explanation
Thanks for watching Uday
so nice and useful!
Thanks for your message
How do we validate the values which display in the mobile App (Actual) against the expected values which stored in the database?
You can store the values from app in a variable and also do the same from database. In katalon there is option to get data from database in Data Files folder. You can then compare both variable values
Hi, very informative video but i have one issue i am not able to select/set value for date picker any clues?
Will have to check the logs, errors Hamid
Is there any possibility to use proxies for web testing in katalon???
Yes, we can give proxy preferences in Global Settings - docs.katalon.com/docs/legacy/katalon-studio-enterprise/set-up-katalon-studio/preferences/proxy-preferences
Hey!! how to use the swipe operation ,can you please give an example
I will plan to add a session on this
I am facing issues while running mobile tests from Jenkins. Works fine locally through command line but through jenkins it gives "It appears that you don't have NodeJS installed and setup correctly." Can you please advise.
Hi Juhi, You will need to give node js path in jenkins or add them as system variables
Hi Juhi, You will need to give node js path in jenkins or add them as system variables
Can we automate mobile web present under gigafox which is a paid environment using katalon studio
I will need to explore on this Prakash
How to enter OTP in sigin-in scenario when OTP field having individual text boxes for each element?
Duraimurugan
Entering an OTP in a sign-in scenario where each digit of the OTP is in an individual text box can be handled in Katalon Studio by using the `setText` method for each field. Here's a step-by-step approach:
1. Capture the OTP: First, you need to capture the OTP from the source. If it's sent via email or SMS, you'll need to write a method to retrieve it.
2. Split the OTP into Individual Digits: Once you have the OTP, split it into individual digits. You can use Groovy's `split()` function for this⁵.
3. Enter the Digits into the Text Boxes: Use the `setText` method to enter each digit into the corresponding text box. You'll need to identify each text box with its unique selector.
Here's a sample code snippet that demonstrates this process:
```groovy
// Assume otpString is the OTP you've retrieved as a String
String otpString = "1234" // Replace with the actual OTP retrieval method
String[] otpDigits = otpString.split("")
// Set text for each OTP digit
WebUI.setText(findTestObject('path/to/first/otp/box'), otpDigits[0])
WebUI.setText(findTestObject('path/to/second/otp/box'), otpDigits[1])
WebUI.setText(findTestObject('path/to/third/otp/box'), otpDigits[2])
WebUI.setText(findTestObject('path/to/fourth/otp/box'), otpDigits[3])
```
Make sure to replace `'path/to/.../otp/box'` with the actual object paths to the OTP input fields in your test.
This approach should allow you to handle the OTP input scenario in Katalon Studio effectively. Remember to handle any potential synchronization issues, such as waiting for the OTP to be received before attempting to enter it.
@@RaghavPal Thanks for your quick reply. I have one more doubt. the method of handling otp is same for mobile app also?
it can be used there too if it fits in your scenario
Hi,
I need a help, Can you please let me know that how to start app which is already present in the emulator/device?
Mobile.startApplication() -> What path shall i give i my app is already there in the mobile?
Hi Manish, I have not tried, but it should work the same way on the emulator, You can try providing apk
excuse me sir. when i launch the test, i get java.lang.reflect.invocationtargetexception in the StartApllication phase of the script. do you know how to fix this?
Hi Davi,
1
Try to add capability
cap.setCapability("automationName", "UiAutomator2");
2
Try updating the chrome driver the default location will be - C:\Program Files(x86)\Appium
ode_modules\appium
ode_modules\appium-chromedriver\chromedriver\win\
You can get the chromedriver as per the ver of chrome on your device
Also can check these for more help
discuss.appium.io/t/native-app-and-browser-is-not-launching/15206/2
discuss.appium.io/t/chrome-browser-is-not-being-launched-in-android-device/15745
Do we use 'wireless debugging' instead of USB debugging?
@navneet
Navneet
When setting up a real device for automation testing, you have the option to choose between wireless debugging and USB debugging. Let me explain both options:
1. USB Debugging:
- USB debugging allows Android devices to communicate with the Android SDK via a USB connection.
- To set up USB debugging:
- On your Android device, open the Settings app.
- Search for "debug" and tap on "USB debugging".
- Enable USB debugging.
- Connect your device to your computer using a USB cable.
- In Android Studio, click "Run" to build and run your app on the connected device.
- USB debugging is a common choice and works well for most scenarios.
2. Wireless Debugging:
- Wireless debugging eliminates the need for a physical USB cable.
- You can debug your applications over Wi-Fi, making it more convenient and reducing wear on your phone's battery.
- Here's how to enable wireless debugging:
- On your Android device, go to Settings and search for "debug".
- Tap on "Wireless debugging", then again in the "Wireless debugging" option (tap the entire item to enter the details page).
- Check the "Use wireless debugging" toggle.
- In the "Allow Wireless debugging on this network" popup, select "Always allow on this network" and tap "Allow".
- Note down the IP Address and Port info (the port number can vary depending on the device).
- Connect your device to your computer over USB initially.
- In Visual Studio Code (VSCode), press Ctrl+Shift+P, search for "ADB: Connect to device IP", and enter the IP Address and Port number.
- You'll see a toast message indicating that you're "Connected to:" the device.
- Now you can disconnect the USB cable.
- Wireless debugging is especially useful when you want to avoid dealing with USB connection issues.
Remember that the IP Address may change based on the network you're connected to, and the port number could also vary. Always test your app on a real device before releasing it to users
--
@@RaghavPal
Thanks for your response.
Do we use wireless debugging in 'Katalon' application for android apps testing.
I have not tried it, but if you are able to connect your device with your system in any ways.. it should be detected and available in Katalon Studio
Excellent tutorial
Glad you liked it Stefano
Hi, Raghav. How to share projects with member of team and work in sync? Thank you very much!
You can use Git, its in-built in Katalon Studio - docs.katalon.com/katalon-studio/videos/git-integration.html
@@RaghavPal Thank you very much!
I have installed appium latest version and it get installed but when I checked whether it is installed or not using command prompt it shows me "'appium' is not recognized as an internal or external command, operable program or batch file." message.
Looks like you need to setup environment variables. Try to see some appium installation tutorial online. You will get it.
Hi Raghav, facing error like this
c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to start app at: 'C:\Users\VSCBS\Katalon Studio\UKR_Sample.prj\androidapp\APIDemos.apk' (Root cause: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
Please help me
Hi Uday, you can try with a diff ver of appium
Sorry, but Katalon Studio in version 8., does it support BDD testing on mobile?
okay, will check on this,, you can also post this on Katalon forum
Hi ,
I was trying to get the next videos in this series in which we have to test using actual apk file,I want to test on android device using KAtalon studio using an APK file , I have done the setup in this video , Now I am stuck for getting apk's and how it works with android studio
Hi Anjali, i will plan to add more sessions on this, for now check online help and can check more videos on katalon here - automationstepbystep.com/
hi Raghav, in my katalon studio there is no report option so i can't see the TS_regressionTest. can you help me to showing that option
Hi, what ver are you using, You can goto your project folder and see if there is Reports folder
Thankyou so much sir
Most welcome Srinivasan
can i test without second device? just by emulator?
Yes, you can Razan
Hello Sir, Thanks for making this kind of videos actually I am trying the same and I am getting this error "The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output."
Hi K Negi, pls check this forum.katalon.com/t/cannot-spy-record-application/19565
Hi Raghav, you are doing great,
actually, I am facing this error while I run the sample test case, please help......
Test Cases/Verify Correct Alarm Message FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: 'C:\Users\Muhyen\Katalon Studio\aaaaaaaaa.prj\androidapp\APIDemos.apk'
Hi Muhammad, thanks for your message. Pls check if in the logs you get more information or reason the the failure.
Does Katalon support Xamarin Apps? Can we share the same test for both Android and iOS?
Hi Lakmal, I have not personally done that, Here are some resources - docs.katalon.com/katalon-studio/videos/automating_native_xamarin_ios_application_macos_katalon_studio.html
Hi Raghav, when I start to record, I have an issue: Cannot find zipalign.exe, although it is exited. How to fix this issue? Thank you so much.
Hi Ánh, this is from a user comment -
issue got resolved when I started appium with appium desktop client and added zipallign.exe in tools folder.
Hi Raghav, Thank you so much. I missed the folder that includes zipalign file.
I am unable to open the browser at all after installing the katalon,nodejs,npm and appium. Everything looks fine. But when I am trying to execute a test case from existing project . It is not opening the browser. Any leads would be appreciated
Hi Ayesha, will need to check logs to troubleshoot
@@RaghavPal Hi Raghav, Sent you the logs in an email also posted the question in the katalon community . Could you please have a look into it.
forum.katalon.com/t/unable-to-find-executable-for-cmd-exe-java-lang-runtimeexception-java-lang-nullpointerexception-unable-to-find-executable-for-cmd-exe/43907
I got some issues trying to recognize the android in my laptop.
trying the cmd command "adb devices" the list was always empty
*this is the fix for it:*
Download Google USB Driver - developer.android.com/studio/run/win-usb
Connect your device with Android Debugging enabled to your PC
Open Device Manager of Windows from System Properties.
Your device should appear under 'Other devices' listed as something like 'Android ADB Interface' or 'Android Phone' or similar. Right click that and click on 'Update Driver Software...'
Select 'Browse my computer for driver software'
Select 'Let me pick from a list of device drivers on my computer'
Double-click 'Show all devices'
Press the 'Have disk' button
Browse and navigate to [wherever your SDK has been installed]\google-usb_driver and select android_winusb.inf
Select 'Android ADB Interface' from the list of device types.
Press the 'Yes' button
Press the 'Install' button
Press the 'Close' button
Now you've got the ADB driver set up correctly. Reconnect your device if it doesn't recognize it already.
=============================
solution from here > stackoverflow.com/questions/41792867/adb-device-list-is-empty
another detail: you have to install Android Studio in order to install Android SDK
you have double check your USB cable (usb cable just for charge will be not recognized by the laptop). It should be bether to use the original cable from cel phone
Thanks a lot for adding all this info, Will help many
how to scroll application sir? at "available actions" button there is no scroll button
please help
Hi, you can use Scroll to text docs.katalon.com/katalon-studio/docs/scroll_element_mobile_automation.html#manual-mode
Hi Raghav, Your videos are really helping a lot..I have just started testing an app. There are 2 objects with same name : android.view.View8 -for login button & an item in an list(which is inside another view) . After capturing objects, i changed the object name android.view.View8(of login button) to android.view.Login and moved to object repository. I set tap action for the renamed login button,and started android test. The test got successful, but instead of tapping LOGIN button it is tapping on the item in the list(which was having the same name).What to do?
Hi Sabitha, you will have to use some unique property or a custom xpath. Have you tried recording the scenario and check what is the object locator used in generated scripts
@@RaghavPal Thanks Raghav.
Getting an Execution Error (' java.lang.NullPointerException" ) when trying to start an mobile application for recording test steps / spying objects ('Unable to capture objects Reason: WSTException")!!
Is it realated to Version Mis-Match (appium: 1.14.1 katalon: 6.04) or something else entirely ??
Hi Asif, can be ver compatibility. check this
forum.katalon.com/t/i-cant-spy-or-record-on-android-mobile/8446/18
docs.katalon.com/katalon-studio/docs/supported-environments.html#mobile
Hi sir,
Can you please do a video how to work with emulator without using a real device.
I will plan Akhil
raghav I have a problem when starting the application in record mode the error says it failed to start the appium server in 60 seconds, can you help me?
Hi, pls check if appium server is running, you can also change the port if required. My appium series can help you automationstepbystep.com/
@@RaghavPal
wow, thank you, raghav, the problem has been resolved
hi @raghav
can you pls suggest some other apk files to test automatically using katalon
Hi Raja, you can find sample apk files for testing online
Unable to start application fail to start appium server in 60 seconds, I m getting this error
Hi Ganesh
The error message "Unable to start application, fail to start Appium server in 60 seconds" typically indicates that the Appium server failed to start within the specified timeout period. This can happen due to various reasons. Let's go through some common solutions to resolve this issue:
1. **Check Appium Server Installation**: Ensure that you have installed the Appium server correctly on your machine. You can verify this by running the Appium server from the command line or terminal and confirming that it starts without any errors.
2. **Check Appium Version**: Make sure you are using a compatible version of Appium with your testing framework and other dependencies. Sometimes, compatibility issues can cause the server to fail to start.
3. **Check Port Availability**: Ensure that the port used by the Appium server (default is 4723) is not blocked or used by another process. If the port is occupied, Appium will not be able to start the server.
4. **Check Java Installation**: Appium requires Java to run. Make sure you have Java installed on your machine and that the JAVA_HOME environment variable is set correctly.
5. **Check Appium Doctor**: Use Appium Doctor (a command-line tool provided by Appium) to check if all the dependencies required for running Appium are installed and configured properly.
6. **Check Appium Log**: Review the Appium server logs to identify any specific errors or issues that might be preventing the server from starting.
7. **Restart Machine**: Sometimes, a simple restart of your machine can help resolve issues related to Appium server startup.
8. **Update Appium and Dependencies**: Ensure that you are using the latest versions of Appium and its dependencies. Outdated versions can sometimes cause conflicts and errors.
9. **Check Desired Capabilities**: If you are using Appium with a testing framework like Selenium or WebDriverIO, double-check the desired capabilities and configurations to make sure they are set correctly.
10. **Try Different Devices/Emulators**: If you are testing on real devices or emulators, try using different devices or emulators to see if the issue persists with a specific device.
How to do application background and then foreground using Katalon Studio ?
Hi Kiran, pls check this. Will have to check on this. You can ask this on katalon forum - forum.katalon.com/
Master, Can I automate mobile via the Web?
Hi Carlos, you can use cloud services like Browserstack, Saucelabs, AWS device farms and use the devices on the web
thanks for getting my problem solved. now when i execute the test case i get this error (Failed to tap on element 'Object Repository/android.widget.ImageView' (Root cause: org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters).
Hi, Ensure you are on the page where the element is, You can add some wait time or have step to waitForElementPresent with some time out. Also ensure the locators are correct
@@RaghavPal Hi , Is it possible if you can make a video on this procedure please. Alot of katalon users are having the same issue
I will plan
@@RaghavPal please if you can do it urgently that would be great sir ! .desperately waiting for that video
Hello I have installed all the prerequisite files and started the recording. But I get the error as 'Unable to start the remote session. Unable to start the application'. What might be the issue?
node.js v12.18.4
I am also facing the same issue
I have changed the appium version to an older one and used application Id instead on apk file and its working fine. Thank you
So happy to know Drishya
Hi Raghav Thank you for This but i am not getting videos for different apk and simulator can u plz help me with this?
Thanks in advance
This video is very helpful.
You're welcome Amruta, you can watch appium series to get more info on mobile testing - automationstepbystep.com/online-courses/
Hi Raghav , can you please help us in letting know How to do Mobile (IOS) Testing on Windows with Katalon Studio ? Kindly let us know what all prerequisites needed to do this testing please.
Hi Supriya, direct testing of iOS on windows is tricky, you may need to have agents setup. There are platforms like TestProject and AppiumStudio that can do that.
@@RaghavPal Hi Raghav , yes i have that in my system i downloaded it , the thing is need to know how the initial set ups to be performed , and how to link Test project with appium studio. Is that possible for you to show that as you did for andriod please.
I don't think you can link the tools directly, If you feel TestProject or Appium Studio can work for you , can try those
Hi raghav thanks for video. Can u please create some videos on security testing. Like how to find cross site scripting and SQL injection.
Sure Saurav, I will