We recently welcomed our 93,000th member, and with that, the Katalon Academy team and us are thrilled to announce a small challenge: Katalon Use Cases Sharing, in which you can get rewarded by simply sharing how you use Katalon in your daily project(s) with the community!
Why you should join
Open to all Katalon users - which also include our Academy instructors and Katalon Creators - this challenge not only enable you to demonstrate your Katalon know-how, offer useful insights and tips for others, but also to win prizes and have your use cases featured on Katalon Academy as well!
What you’ll need to do
From now till 2024-12-01T16:59:00Z, simply video record how you apply Katalon in your work or personal project(s) and share them with us. Be sure to adhere to our submission requirements below
Submission requirements
1. Video requirements:
Short videos (2-4 minutes) are preferred.
Each video will correspond to one use case only.
There’s no limit on the number of use cases videos that you can submit.
Your videos should follow the below content flow:
Problem: Present a specific testing or automation challenge.
Solution: Introduce how the Katalon tool(s) is used to solve such problem.
How-To: Provide a concise, step-by-step demonstration of the solution.
2. Voice requirement:
You can use either voice-over or text on-screen (this is preferred)
Or, you can choose not to include voice-over if your video(s) is self-explanatory or very easy to follow.
How to submit your use cases videos
Upload your recorded videos to either YouTube or Google Drive
Share the link with us by replying to this thread
Write a short description of your use cases
And lastly, engage with other forum members to gather votes for your use cases videos.*
Notes:
Your Google Drive and/or YouTube links must be public and/or unlisted.
If you have multiple use cases, each of them must be in a separate reply in this thread.
Please take care to blur out any sensitive information before recording your screen.
Evaluation criteria
Correct Tool Usage: Submissions must demonstrate the use of Katalon Studio or other Katalon solutions.
Adherence to Video Flow: Videos should follow the format of problem identification, solution presentation, and a clear how-to demonstration.
Originality: Submissions should be original and come from user experiences.
Engagement Potential: High-quality, informative, and engaging content is more likely to receive positive reactions.
Be clear and concise in your explanations.
Use visuals and annotations where possible to make the video more informative.
Engage with other community members by responding to comments and questions.
Timeframe
Submission period: Nov 5, 2024 to 2024-12-01T16:59:00Z
Voting period: Nov 5, 2024 to 2024-12-01T16:59:00Z
Winner announcement: One (1) week after the challenge is over.
Your prizes
You can win either, or both, of the prizes below:
People’s Choice: Awarded up to five (5) members who have the highest number of accumulated reactions for their use case videos → A $50 eGift card each.
The Enthusiasts: Awarded to ten (10) members who share at least 3 use case videos → a $75 eGift card each.
We can’t wait to see the use cases that you’ll share with us!
It’s getting a bit quiet here. Why not join in the challenge and share as many Katalon use case videos as you can and earn up to $125? Our challenge last until Nov 24, 2024 so don’t miss out!
How can we create Test Project for Web, Mobile, Desktop, API Services & Generic in Katalon Studio
In Katalon Studio, users are presented with different project types when creating a new project, such as Web, Mobile, Desktop, API Services, and Generic. Each project type offers unique components and configurations tailored to specific testing requirements. However, users often lack clarity on the differences between these project types and the specific components each one loads. This lack of understanding may lead to confusion in selecting the most suitable project type for their testing needs, potentially resulting in inefficient test setups or redundant configurations.
Solution: Select respective Project Type in Katalon Studio based on requirement explained in this video
Quick Learning Sessions: Lesson 02 – Automate Tests using Manual View – No Code
Problem Statement
Automating and organizing test cases in Katalon Studio can be challenging for users who prefer a manual, step-by-step approach without coding. Users may find it difficult to efficiently automate test cases using groovy coding (supported by Katalon), especially if they are unfamiliar with any coding languages in the past. This can lead users to give up before actually automating anything.
Solution:
Generate test steps in Katalon Studio manual view (No Code) using Keywords and Objects
Pre-condition: Capture the elements in the Object Repository. I will publish another video demonstrating how to capture elements in the Object Repository.
Hi folks , ever stuck updating old test accounts after login? Total time-waster, right? I used Katalon Studio + decision-making statements to streamline my login tests, and wow, game-changer! Save time, test smarter. Who’s with me? #QATips#TestAutomation
Problem- Some test scenarios are recurrent and comes every now and then, so it becomes hectic to write each test steps for every test case. Solutions- To deal the recurrently coming scenarios, best way is to create custom keyword and then use it frequently where you want in the entire project How-to- Katalon allows creating custom keyword which user can call anywhere for any number of times. In this way, you can save time, energy and effort and simultaneously streamline the test script.
Outlook code fetch Problem- Normally multi factor authentication has become mandatory things in the any application. Where we get code on outlook mail box, so while automating script we need that code every time. Solution The only solution is to provide code that code from the mail box to proceed in the script. How-to We can automate this script in 2 ways 1) by frontend 2) Backend via API. Currently in this video I have shared the frontend part of fetching the code.
Hello all,
I would love to share with you all a use case:
Scenario: I have a dropdown in the website, where I select a number and then after selecting, some fields/rows are generated below as per the selected number. Example: If I select the number 25 then 25 fields will generate in the website.
Now I want to verify if the selected number in the dropdown, is equal to the generated fields below.
Below code will work in this scenario:
WebUI.openBrowser('')
WebUI.navigateToUrl('file:///Users/bhavyansh-katalon/Desktop/website.html')
WebUI.delay(2)
String selectItem = "100"
// selecting the item number
WebUI.selectOptionByValue(findTestObject('Object Repository/Page_Dropdown to Table/dropdown'), selectItem, true)
WebUI.delay(2)
//waiting for the table/container to be visible that contains all the fields
WebUI.waitForElementVisible(findTestObject('Object Repository/TableContainer'), 10)
// Get the table rows (excluding the header row)
//common object locator for all the generated fields
List<WebElement> rows = WebUiCommonHelper.findWebElements(findTestObject('Object Repository/TableRowCommon'), 10)
int rowCount = rows.size()-1
// we subtract 1 to remove the count for the header
// Log the row count
println("Number of rows in the table: " + rowCount)
//verify that the selected item number is equal to the generated fields
WebUI.verifyEqual(rowCount, selectItem)
WebUI.closeBrowser()
I would also love to share the video that shows the working, and the website’s HTML if you would like to test it from your side: Video Representation
Website’s HTML: website.html (4.3 KB)
I would love to share another similar use case. Scenario: My website has a Date column and would like to verify that the dates in the rows/cells are in a Chronological order meaning that the Latest date is at the top and then the past dates.
Steps:
1.Firstly after selecting the number in the dropdown, we have to extract Dates from the Table.
To do so you can create a common object locator that defines all the Date Cells inside the column. For example, I created this locator "//table//tr[position() > 1]//td[1] " which locates/identifies all the Date cells inside the Date column.
Then please create a new Object in Katalon Studio and enter the created locator in that Object.
Now we can use the WebUI.findWebElements() to retrieve all date cells in the table body (but not the headers), as shown below:
After that we will extract the text content of each cell, and will pars it using the SimpleDateFormat, and then add to a List object, as shown below. I have taken the format as “MM/DD/YYYY”:
List<Date> dateList = []
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy")
for (WebElement dateCell : dateCells) {
String dateText = dateCell.getText()
if (dateText) {
Date parsedDate = sdf.parse(dateText)
dateList.add(parsedDate)
}
}
Now we will validate the Chronological order:
The script assumes that the table is in descending chronological order (latest dates first).
Using a loop, it compares each date with the next one in the list: If any date is earlier than the next date, the isChronologicallyOrdered flag is set to false.
boolean isChronologicallyOrdered = true
for (int i = 0; i < dateList.size() - 1; i++) {
if (dateList.get(i).before(dateList.get(i + 1))) { // Check if current date is earlier than the next one
isChronologicallyOrdered = false
break
}
}
In the end of the script, the below functions will get performed:
A message is printed based on whether the dates are correctly ordered.
An assertion (assert) will ensure that the test will fail if the dates are not in the Chronological order. You can also remove this assert, if needed and just keep the print statements to verify.
if (isChronologicallyOrdered) {
println("The dates are in chronological order with the latest dates first and the past dates below!")
} else {
// Updated message to specify that the latest dates are not at the top
println("The dates are NOT in chronological order: the latest dates are NOT at the top!")
}
assert isChronologicallyOrdered == true : "The dates are not in chronological order with the latest dates first!"
Below is the full script from my side with comments for better understanding:
import static com.kms.katalon.core.testobject.ObjectRepository.*findTestObject*
import java.text.SimpleDateFormat
import org.openqa.selenium.WebElement
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
WebUI.*openBrowser* ('')
// Website having dates in Descending order
WebUI.navigateToUrl('file:///Users/bhavyansh-katalon/Desktop/website.html') /
WebUI.*delay* (2)
//Select the number of rows
String selectItem = "25"
WebUI.*selectOptionByValue* (*findTestObject* ('Object Repository/Page_Dropdown to Table/dropdown'), selectItem, true)
WebUI.*delay* (2)
//Wait for the table to become visible
WebUI.*waitForElementVisible* (*findTestObject* ('Object Repository/TableContainer'), 10)
//Get all the date cells from the table (skip the header row) // The locator for the object should locate all the date cells in the column
List<WebElement> dateCells = WebUI.*findWebElements* (*findTestObject* ('Object Repository/DateCellObject'), 10)
//Extract the date text and parse it into Date objects
List<Date> dateList = []
**SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy** ")
for (WebElement dateCell : dateCells) {
String dateText = dateCell.getText()
if (dateText) {
Date parsedDate = sdf.parse(dateText)
dateList.add(parsedDate)
}
}
//Verify that the dates are in chronological order (latest first, then past dates)
boolean isChronologicallyOrdered = true
// Loop through the list of dates and check if each date is later than or equal to the next one
for (int i = 0; i < dateList.size() - 1; i++) {
if (dateList.get(i).before(dateList.get(i + 1))) { // Check if current date is earlier than the next one
isChronologicallyOrdered = false
break
}
}
//Assert that the dates are in chronological order and print the result
if (isChronologicallyOrdered) {
println("The dates are in chronological order with the latest dates first and the past dates below!")
} else {
println("The dates are NOT in chronological order: the latest dates are NOT at the top!")
}
//Assert that the dates are in chronological order. This test will fail if the dates are not in the Chronological order and will pass if the dates are in Chronological order
assert isChronologicallyOrdered == true : "The dates are not in chronological order with the latest dates first!"
//Close the browser
WebUI.*closeBrowser* ()
We were fond of Katalon for automating our Web UI cases, but still had to rely on manual activities for E2E SIT testing and wanted to find a way to peerform E2E SIT test automation by having each QA focusing on their system / automation project without having to duplicate code from one project to another.
We used data files and corresponding excel files as a vessel between automation projects to achieve it, more details on how in the video.
I would love to share with you another use case. How to disable the info-bar “Browser is being controlled by automated test software.” when running tests on Chrome and Edge Chromium browsers, as highlighted below:
For Chrome Browser:
On Katalon Studio, please go to: Project > Settings > Desired Capabilities > WebUI > Chrome:
In here, please add the property: excludeSwitches → List → String → enable-automation, like below:
For Edge Chromium Browser:
On Katalon Studio, please go to: Project > Settings > Desired Capabilities > WebUI > Edge (Chromium):
In here, please add the property:
ms:edgeChromium → Boolean → true
ms:edgeOptions → Dictionary →
useAutomationExtension → Boolean → true
excludeSwitches → List → String → enable-automation
Output will be that the info-bar “Browser is being controlled by automated test software.” will not be visible when running the tests from Katalon Studio:
We can call the same properties in the scripts too: For Chrome:
System.setProperty('webdriver.chrome.driver', DriverFactory.getChromeDriverPath())
ChromeOptions options = new ChromeOptions()
options.setExperimentalOption('excludeSwitches',Collections.singletonList('enable-automation'));
options.addArguments("incognito", "start-maximized", "disable-infobars");
ChromeDriver driver = new ChromeDriver(options)
DriverFactory.changeWebDriver(driver)
Problem- Sometime we need to carry forward one code or id which is generated in one test case into another or different test case, during the test execution is on the run. Solution- Here Dynamically generated global variables comes into handy. User can create global variable and use then into other test case Via Test suite. How-to- Create global variable in profile, and link that to a test case where the code or id is getting generated. Once after generation user can use the dynamic id into other test cases by clubbing all the test cases into test suite.