Auto-generated import statements should include "WebElement"


In v8.1.0, when I newly create a Test Case script, the following import statements are arutomatically generated by Katalon Studio.

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys



I want the following lines to be included in this auto-generated import statements.

import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement


  1. com.kms.katalon.core.webui.keyword.WebUiBuiltinKeywords implements WebUI.findWebElemmnts(TestObject) which returns List<WebElement>. Therefore user needs to write a line of import org.openqa.selenium.WebElement anyway. See this as well.

  2. Experienced users frequently use org.openqa.selenium.WebDriver objects returned by getWebDriver() method of com.kms.katalon.core.webui.driver.DriverFactory.

1 Like

how about editable template in settings?

Editable template for import statements?

I don’t think it worth doing. I raised this topic because I find in this forum posts, many people do not know the FQCN of WebElement, for example:

If they don’t know the fully qualified class name to be included in the default imports, they would not be able to edit the template. The template would never be used.

By the way, “editable template for E-Mail” from Test Cases on failure — I remember many people have expressed their requirement. For example.

, but Katalon team has not worked on it at all. I think it would better worth addressing.

c/c @Jass


Thanks for bringing this up. I already logged the request for customizing email template to our backlog and I’m considering for implementation in upcoming releases.

Happy Testing


1 Like

Bump! Is this request being considered?

See also:

Hi Kazu,

Still pending on this one, will get back ASAP if anything change, thank you for the consideration.

Hi Kazu

Thank you for mentioning this request. In upcoming releases, we have a plan to improve the error and failure messages to make it more instructional and user friendly.