[Recap] Ask Katalon Experts: Live Q&A Session and Automated Testing Best Practice

Q: Reports - How can we see all internal test steps in reports?

A: You can do an execution at Test Suite/Test Suite Collection level to see them.

1 Like

Q: I have recently started using CSS Selectors instead of XPaths in my element locators. Usually when creating new ones or during some refactoring, both cases worked fine. Is there a recommendation on which one I should use? During the session you have advised to use either XPath or Attributes, but no mention of CSS Selector.

A: Thank you for your question. CSS Selectors is not something that everyone is familiar with. Hence, XPath and Attributes will be better suited for people with little or no prior coding knowledge. If you are more familiar with CSS, please go ahead and use it freely.

1 Like

Q: If the target application is only accessible via a VPN (Virtual Private Network), can we still use Katalon TestCloud?

A: Unfortunately, no. If the target application is only accessible via a VPN (Virtual Private Network), you may not be able to directly use a TestCloud service with Katalon Studio. Katalon TestCloud services typically require access to the application under test without any additional network dependencies, such as a VPN connection.

1 Like

Q: Does Katalon support Flutter applications?

A: Yes, we do. You can use Flutter Appium Driver to do that. If you need any support, please reach out to us here on the forum if you are one of our free users, or via our Support Portal below if you are one of our paying customers. :point_down:

https://katalon-inc.my.site.com/katalonhelpcenter/s/

1 Like

Q: Can we pass the Captcha or OTP in Mobile Applications?

A: It is not good practice to automate Captcha (for security reasons) but you can automate OTP. Please follow the thread below to learn more on how to use Katalon Studio to automate OTP on mobile devices… :point_down:

1 Like

Q: What is currently the latest supported version of Android and Appium with Katalon?

A: We support Appium 2.x in Katalon Studio version 9.0.0 beta and above. There is no restrictions on Android version.

1 Like

Q: I have an example use case: There is form registration, and I want to test whether the validations in the email form work or not. How can i create the test case using Katalon Studio,and how do I create the report?

A: Please follow the steps below… :point_down:

To create a test case in Katalon Studio to verify the validation in an email form, follow these steps:

  1. Create a New Test Case:
    • In Katalon Studio, create a new test case by right-clicking on the Test Cases folder, selecting “New” > “Test Case”.
    • Give the test case a meaningful name, such as “Email Form Validation Test.”
  2. Open the Application:
    • Use Katalon Studio’s built-in keywords, such as WebUI.openBrowser() and WebUI.navigateToUrl(), to open the application and navigate to the registration form page.
  3. Enter Invalid Email:
    • Use the WebUI.setText() keyword to input an invalid email address in the email field of the registration form.
    • Consider using different variations of invalid email addresses (e.g., missing “@” symbol, incorrect domain format) depending on the validation requirements.
  4. Submit the Form:
    • Use the WebUI.click() keyword to submit the form.
    • If there is a validation message displayed for the email field, use validation keywords like WebUI.verifyElementVisible() or WebUI.verifyElementText() to validate the presence and content of the validation message.
  5. Enter Valid Email:
    • Repeat step 3, but this time input a valid email address in the email field.
  6. Submit the Form:
    • Repeat step 4 by using the WebUI.click() keyword to submit the form.
    • Validate that there are no validation error messages displayed for the email field.
  7. Close the Browser:
    • Use the WebUI.closeBrowser() keyword to close the browser after the test case execution.

To generate a test report in Katalon Studio, follow these steps:

  1. Execute the Test Case:
    • Right-click on the test case and select “Run” > “As Test Case” or “Run” > “As Test Suite” to execute the test case.
    • You can also execute multiple test cases or a test suite that includes this test case.
  2. View Test Report:
    • Once the test execution is completed, navigate to the “Reports” folder in the Katalon project directory.
    • Open the latest HTML report file to view the test report in a web browser.
  3. Customize the Test Report:
    • Katalon Studio provides options to customize your test reports.

    • You can include additional test steps, screenshots, or logs by using appropriate keywords and utilities provided by Katalon Studio.

    • The reports can be further customized by modifying the report templates using HTML or other scripting languages.

When viewing the test report, you will see the overall test execution status, individual test steps, any failed assertions or errors, and screenshots (if configured). The report will provide you with valuable information on each test case’s status and any issues encountered during validation.

1 Like

Q: Are there any recommendations for speeding up the process of recording and running test scripts in a web browser? I am seeing that it is rather slow in Chrome.

A: You can update to Katalon Studio version to 9.0.0 beta version, we have made several improvements to speed up said process. Please see the thread below for more details… :point_down:

1 Like

Q: Is there a way to customize the default Teams Web Hook message notification? This is an example of what we have at the moment…

Summary execution result of Test Suite: MyFirstTestSuite
FAILED: 6
ERROR: 14
PASSED: 3

A: In Katalon Studio, you can customize the default Teams Web Hook message notification by modifying the payload of the request that is sent to the Teams Web Hook endpoint. Please follow the steps below on how you can do it:

  1. Open your Katalon Studio project and navigate to the test case or test suite where you have configured the Teams integration.

  2. Locate the step where you are sending the HTTP request to the Teams Web Hook endpoint. Typically, this would involve using the WebUI.sendRequest() or WS.sendRequest() keyword.

  3. Within the request payload, you can modify the JSON structure to customize the message content and appearance. The specific customization options would depend on your requirements and the formatting capabilities supported by the Teams messaging platform.

  4. Here’s an example of modifying the request payload using the WebUI.sendRequest() keyword:

groovy
import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

// Creating a new RequestObject with the modified payload
RequestObject requestObject = findTestObject('your_request_object')
requestObject.setBodyContent('your_customized_payload')

// Sending the customized request and capturing the response
ResponseObject responseObject = WS.sendRequest(requestObject)

By modifying the JSON payload content, you can customize various aspects of the Teams notification, such as message text, formatting, attachments, and other relevant information.

Keep in mind that the customization options are subject to the capabilities and limitations of the Teams Web Hook integration. It’s recommended to refer to the official Microsoft Teams documentation for detailed information on customizing message notifications and the available formatting options."

1 Like

Q: One of the challenges we are currently facing is when navigating to a web application, the browser presents a authentication challenge pop-up. We need to get past that in order to get to the “proper” authentication page. Can you suggest us on to how to do that?

A: Use a separate WebDriver profile:

  • Create a new WebDriver profile for your browser (e.g., Chrome or Firefox).
  • Configure the profile to include the authentication credentials in the URL. For example, for Basic Authentication, you can include the username and password in the URL: http://username:password@example.com.
  • In Katalon Studio, switch to the custom WebDriver profile when navigating to the web application.
  • This approach bypasses the authentication pop-up and directly logs in to the application.
1 Like

Q: Any idea of how we can resolve this type of exception:

Unable to capture objects : Reason : WebDriverException
org.openqa.selenium.WebDriverException: An unknown error occurred in the remote end while processing the command. (WARNING: The server did not provide any stacktrace information)

A: You can try using Katalon Chrome Utility to access it.

1 Like

Q: We have a big Regression Test Suite, right now it is taking a long time to launch the Test Suite and then run the Suite., can you suggest some way to increase the speed of execution?

A: If you can share more details on your set up and performance, we can check with our product team. You can contact us at business@katalon.com.

1 Like

Q: Can we upload and download files? To access a file dialog box and select file and upload what action should we use?

A: Yes, in Katalon Studio, you can automate file upload and download processes. To interact with the file dialog box, select a file, and upload it, you can use the following actions:

  1. Upload a File:
    • Use the WebUI.uploadFile() keyword to upload a file. This keyword takes two parameters: the target object and the file path of the file you want to upload.

Example:

groovy
   WebUI.uploadFile(findTestObject('your_upload_button'), 'C:/path/to/your/file.txt')
  1. Download a File:
    • To download a file using Katalon Studio, you can’t interact directly with the file dialog box as it is a browser-specific UI control. However, you can download files using the browser’s default behavior by clicking on download links or buttons, and defining the destination folder for the downloaded file.

Example:

groovy
   // Click on the download button/link
   WebUI.click(findTestObject('your_download_button'))

   // Verify the file is downloaded
   String filePath = 'C:/path/to/destination/folder/file.txt'
   KeywordUtil.logInfo(""Checking if the file is downloaded..."")
   WebUI.waitForFilePresent(filePath, 30)
  1. Set the File Path for File Inputs:
    • When automating forms that involve file upload, you can use the WebUI.setText() keyword to set the file path for the file input element.
      Example:
groovy
   // Replace 'your_file_input' with the actual test object representing the file input element
   String filePath = 'C:/path/to/your/file.txt'
   WebUI.setText(findTestObject('your_file_input'), filePath)

:information_source: Make sure to replace ‘your_upload_button’, ‘your_download_button’, ‘your_file_input’, and the file path (‘C:/path/to/your/file.txt’ in the examples) with the appropriate values for your application.

1 Like

Q: Do you have a Mobile App Automation video tutorial with files to try it out?

A: You can check out one of our courses on Katalon Academy below… :point_down:

You can also download our Mobile Testing sample projects below:

1 Like

Q: Can we automate email and access email body using Katalon? Do you have any tutorials or links?

A: You can check out the thread below on how to automate Gmail and Outlook OPT extraction …

1 Like

Q: If I want to select a doctor name dynamically (runtime) based on the input provided from the excel, how do we get the locator in that case? Alternatively, how do I identify the required object if said object would change dynamically based on the data entered in the Excel sheet?

A: You would use TDD approach to fetch the values from data sources like Excel files, CSV etc.

Or, you can use Apache Poi libraries to interact with the Excel files and then create a custom keyword to get the dynamic elements and repeat for other data sources in Excel. This is a high level approach on how it can be achieved.

1 Like

Q: How can we use Katalon in BDD Framework using Cucumber?

A: You can follow the instructions in the video below…

1 Like

Q: Has anyone already extracted information from Katalon TestOps? I would like to send a customized report, so I need to extract some information at the end of the execution.

A: Yes, you can extract the report from TestOps; however, at the moment, we do not have any option to customize reports.

1 Like

Q: How different browser behaviors can be handled in a Test Case? e.g. The differences between Chrome and Firefox or differences between mobile view and desktop view.

A: In Katalon Studio, you can handle different browser behaviors within a test case by using conditional statements, browser-specific keywords, and browser profile options. Here are some approaches to handle different browser behaviors:

  1. Conditional Statements:

    • Use conditional statements, such as if or switch, to check the type or version of the browser and execute specific actions accordingly. You can use the WebUI.getBrowserUrl() or WebUI.getBrowserTitle() keywords to retrieve browser information and perform different actions based on the browser behavior.
  2. Browser-Specific Keywords:

    • Katalon Studio provides browser-specific keywords that allow you to perform certain actions based on the browser type. For example:
     - WebUI.clickOffset() to handle specific click actions in Firefox.
     - WebUI.focus() and WebUI.blur() to handle certain behaviors in Internet Explorer.
     - WebUI.waitForJQueryAjaxLoad() or WebUI.waitForAngularLoad() 

… to handle JavaScript-related behaviors in Chrome.

  1. Browser Profile Options:
    • Different browsers may have specific settings or preferences that affect their behavior. You can utilize browser profile options to customize the behavior of specific browsers. For example, in Chrome, you can use the ChromeOptions capability to set specific preferences or command-line options.
groovy
   import org.openqa.selenium.chrome.ChromeOptions
   import com.kms.katalon.core.webui.driver.DriverFactory

   ChromeOptions options = new ChromeOptions()
   options.addArguments("--start-maximized")

   // Launch Chrome with custom options
   WebUI.openBrowser('', options)

This example sets the Chrome browser to start maximized. You can explore the browser-specific capabilities and options for other browsers as well.

  1. Element Locators:
    • Different browsers may have variations in the way they render web pages, which can affect the behavior of locating web elements. In the test case, you can use different locators based on the browser being tested. Use Katalon’s built-in locators, such as XPath, CSS selector, or other attribute-based locators, to handle browser-specific behavior.
1 Like

Q: How can I speed up the total execution time of the Test Suites if there are big scripts?

A: You can run the same test case using different browsers in a Test Suite and you can use it in a test case level as well.

You have to increase the test instances to speed up the total execution time.

The instances can be increases on a test suite level. But, please be aware that it will also increase CPU utilization if you go beyond the max length.

2 Likes