Skip to main content

Problems I Was Facing During Learning Katalon Studio (Mobile App)

When I came to hear that I can do automation testing for Web, App, and API in just one platform, I feel amazed. After that, I just jumped into learning Katalon. After 30 minutes of learning Katalon, I was talking to myself, “WTH! Why didn’t I found it early.” I was thinking to learn mobile app testing, so I take a project and start learning. I have interacted with some problems which are so common in Katalon forums, but still, the solution is not able to solve my problem. So I was looking for the answer and finally came up with the solutions. So, I thought why not I’m sharing the solution here which might help you guys when you will start learning it. Also, you can found my solution in the comment section of the problem in the Katalon forum. So let’s start-

Problem 1: Can’t able to pass my app’s splash screen at the time of capturing objects!

The problem is you can’t go beyond the splash screen of your app at the time of capturing the objects. Your emulator screen stuck at the splash screen of your app. So the solution is

  1. First, you need to check your Appium version. Make sure the version is 1.8.1.
  2. Then, you need to configure some settings. Go to the Project Settings> Desired Capabilities > Mobile > Android, then set the parameter
appWaitPackage: com.mycompany.myapp //your app package name
appWaitActivity: *

    3. Then at the time of performing “Record Mobile”, if your app splash screen gets stuck then just press the capture object button. And, “Woo-Haaa!” the app moves past the splash screen.


Problem 2: Can’t able to press the search button from the keyboard!

While writing scripts, I need to press the search button from the keyboard. But not able to press it by using sendkeys or pressKeyCode/pressKey. Here is the solution for this:

First Import

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory as MobileDriverFactory
import io.appium.java_client.android.AndroidDriver as AndroidDriver
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.logging.KeywordLogger
import com.google.common.collect.ImmutableMap as ImmutableMap;

Then called the AndroidDriver

AndroidDriver<?> driver = MobileDriverFactory.getDriver()

Now select that Text field by spying/recording/from captured object class name and send your desired text:

driver.findElement(By.className('android.widget.EditText')).click()
Mobile.delay(3)
driver.getKeyboard().sendKeys("milk")

Now Click on search by writing this command

driver.executeScript("mobile: performEditorAction", ImmutableMap.of("action", "search"));

It’s worked for me.

I will post many more problems that I will face at the time of learning Katalon in this post or in a separate post. Stay Tuned. Bye!


Comments

Popular posts from this blog

Test Automation Pyramid: How to Automate Test Effectively

 Mike Cohn introduced the test automation pyramid in his book Succeeding with Agile: Software Development Using Scrum , which is a concept that defines three layers against which tests can be automated: Unit, Services, and User Interface. Test Automation Pyramid If one reason you’re automating tests is to get things done quickly, you’ll want to make sure your automated tests run as quickly as possible. One way to do this is to automate the tests so that they are as close as possible to production. Unit Level of The Pyramid Automated Unit testing is a process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit tests are small, modular tests that check the logic of individual functions without using other functions, databases, or user interfaces. Unit tests are fast, and they can pinpoint the exact function where a bug is occurring. Because of this, most of the automated tests should be writte...

Why am I learning Automation Testing?

I’ve been working as an SQA Engineer for the last few months. Though I’m familiar with SQA since my undergraduate life and did the ISTQB foundation level course, all I did is manual testing. Recently, test automation drew my attention. As I love to work smartly rather than working hard, I try to find ways that perfectly accomplish my work in a pretty fast and effective way. So here I’m exploring automation testing as well as sharing my knowledge with you all.  Basically in this article, I’m giving a clear concept of what automation testing is all about, why it is better than manual testing. Automation Testing Every software company tests their products before the release. Nevertheless, every released software always has some bugs. Even though the software testers try their best to find every possible bug with manual testing, bugs often reappear since manual testing does not have that much accuracy, besides it is time-consuming. This is why automation testing is becoming ...