Test object with id 'Object Repository/' does not exist.


#1

Hello everyone.

Facing this problem: Katalon test suites pass correctly in Katalon Studio on Windows 10, but some tests from the same test suites fail on Linux.

Here is a part from log:

2019-01-08 13:53:29.274 DEBUG .01 - Test_HomePage_Elements_Visibility_ - 9: verifyElementPresent(findTestObject("Object Repository/App/HomePage/input_searchBox"), 0)

2019-01-08 13:53:29.300 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/App/HomePage/input_searchBox’ does not exist
2019-01-08 13:53:29.372 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/’ does not exist
2019-01-08 13:53:30.057 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)
2019-01-08 13:53:30.099 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: verifyElementPresent(findTestObject(“Object Repository/App/HomePage/input_searchBox”), 0) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$3.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1546941159080.run(TempTestSuite1546941159080.groovy:36)

2019-01-08 13:53:30.141 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_ FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$3.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1546941159080.run(TempTestSuite1546941159080.groovy:36)

2019-01-08 13:53:30.157 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_


#2

Full marks for posting your errors completely. :slight_smile:

Zero marks for not showing your code and other pertinent material. :frowning:

All your errors surround the “verify” APIs. Did you try “wait” APIs?

In future, please follow the advice given here:


#3

Sorry, I am first time here. I have tried to edit my post, but it keeps saying “Title has already been used”.

Link to the web page I am testing:
http://dev-app.zoomadmin.com/App-GitClient/?machineId=42cf2540-eceb-4c13-afe0-49cc3784d688&softwareTypeId=6745ee29-1e57-4465-a0b0-df53da12699c

Here is my code:

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 com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords 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.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.testobject.RequestObject as RequestObject
import com.kms.katalon.core.testobject.ResponseObject as ResponseObject
import groovy.json.JsonSlurper as JsonSlurper
import com.kms.katalon.core.exception.StepFailedException as StepFailedException
import za.ZaCommon as ZaCommon

import org.openqa.selenium.By as By
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import static org.junit.Assert.assertTrue;

/*

Purpose:
The purpose of this test case is to confirm that Git Client Home Page elements are visible and have the basic properties.

Steps/Action:

Step 1. Navigate to Git Client Repositories page
- URL: http://dev-app.zoomadmin.com/App/GitClient/?machineId=42cf2540-eceb-4c13-afe0-49cc3784d688&softwareTypeId=6745ee29-1e57-4465-a0b0-df53da12699c

Verify Results:

  1. Verify that Left sidebar is visible.
  2. Verify that “Home / My Linux Server / Git Client” Path is visible and is at the top.
  3. Verify that “Repositories” heading is visible and is under the path.
  4. Verify that Search Box is visable and is under the heading.
  5. Verify that Search Box has placeholder text “Enter Keyword”.
  6. Verify that “Create” button is visible.
  7. Verify that Repositories list table is visible.

*/
def baseUrl = za.ZaCommon.getBaseEnvironmentUrl()

// Step 1.
WebUI.navigateToUrl(baseUrl + “App-GitClient/?machineId=42cf2540-eceb-4c13-afe0-49cc3784d688&softwareTypeId=6745ee29-1e57-4465-a0b0-df53da12699c”)

// Step 1. Verify 1.
WebUI.delay(2)
WebDriver driver = DriverFactory.getWebDriver()
WebUI.verifyEqual(driver.findElements(By.id(“leftMenuSideBar1”)).size(), 1)

// Step 1. Verify 2.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/div_Path’), 0)

// Step 1. Verify 3.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/h2_Repositories’), 0)

// Step 1. Verify 4.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/input_searchBox’), 0)

// Step 1. Verify 5.
WebUI.verifyElementAttributeValue(findTestObject(‘Object Repository/App/HomePage/input_searchBox’), “placeholder”, “Enter Keyword”, 0)

// Step 1. Verify 6.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/a_Create’), 0)

// Step 1. Verify 7.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/table_GitClient’), 0)

Here is the screenshot of test object and where it is situated in the Objects Repository:

P.S. I want to mention again that this test case passes correctly on Windows 10, but fails on Ubuntu.


#4

Here is the ZaCommon.groovy file from the Keywords -> za folder:

package za
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 com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.checkpoint.Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords
import com.kms.katalon.core.model.FailureHandling
import com.kms.katalon.core.testcase.TestCase
import com.kms.katalon.core.testcase.TestCaseFactory
import com.kms.katalon.core.testdata.TestData
import com.kms.katalon.core.testdata.TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords

import internal.GlobalVariable

import MobileBuiltInKeywords as Mobile
import WSBuiltInKeywords as WS
import WebUiBuiltInKeywords as WebUI

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

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory
import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.testobject.ConditionType
import com.kms.katalon.core.testobject.TestObjectProperty

import com.kms.katalon.core.mobile.helper.MobileElementCommonHelper
import com.kms.katalon.core.util.KeywordUtil

import com.kms.katalon.core.webui.exception.WebElementNotFoundException

import groovy.json.JsonSlurper as JsonSlurper

public class ZaCommon {

@com.kms.katalon.core.annotation.SetUp
public static restApiCall(RequestObject request) {

	request.restUrl = request.restUrl.replaceFirst("local-dev-", GlobalVariable.envName)
	println(request.restUrl)

	ResponseObject response = WS.sendRequest(request)
	Object jsonResponse = new JsonSlurper().parseText(response.responseText)
	if(jsonResponse instanceof Boolean || jsonResponse instanceof Integer || jsonResponse instanceof ArrayList ){
		return jsonResponse
	}
	if(jsonResponse instanceof Object){
		if(jsonResponse.get("error")==null && response.getStatusCode() != 200){
			def message = "Request Failed, Status Code: "+response.getStatusCode();
			jsonResponse = new JsonSlurper().parseText('{"error":{"Message":"'+message+'"}}')
		}
	}
	//KeywordUtil.markPassed("Response status codes match")
	//KeywordUtil.markFailed(message);
	return jsonResponse;

}
/*
 @com.kms.katalon.core.annotation.SetUp
 public static hasError(ResponseObject response, Object jsonResponse) {
 if(jsonResponse instanceof Boolean || jsonResponse instanceof Integer || jsonResponse instanceof ArrayList ){
 return false
 }
 if(jsonResponse.get("error")==null && response.getStatusCode() != 200){
 return true;
 }
 return false
 }*/

@com.kms.katalon.core.annotation.SetUp
public static getEnvironmentUrl(String url) {
	url = url.replaceFirst("local-", "")
	url = url.replaceFirst("dev-", GlobalVariable.envName)
	return url
}
@com.kms.katalon.core.annotation.SetUp
public static getBaseEnvironmentUrl() {
	def url = getEnvironmentUrl('http://local-dev-app.zoomadmin.com/')
	return url
}

}


#5

Much better info, thank you.

Now try the wait APIs but give them adequate time to “wait”. For example:

// Step 1. Verify 2.
WebUI.waitForElementPresent(findTestObject(‘Object Repository/App/HomePage/div_Path’), 10)

Setting them to zero is not helping you.


#6

Thank you, but this also threw the same error.
P.S. Same error when I try to setText, sendKeys, etc. The problem is not with all elements in Object Repository, but with couple of them.

2019-01-08 22:11:49.040 DEBUG .01 - Test_HomePage_Elements_Visibility_ - 8: waitForElementPresent(findTestObject(“Object Repository/App/HomePage/input_searchBox”), 10)
2019-01-08 22:11:49.070 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/App/HomePage/input_searchBox’ does not exist
2019-01-08 22:11:49.198 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/’ does not exist
2019-01-08 22:11:49.591 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to wait for object to be present (Root cause: java.lang.IllegalArgumentException: Object is null)
2019-01-08 22:11:49.671 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: waitForElementPresent(findTestObject(“Object Repository/App/HomePage/input_searchBox”), 10) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to wait for object to be present (Root cause: java.lang.IllegalArgumentException: Object is null)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.WaitForElementPresentKeyword.waitForElementPresent(WaitForElementPresentKeyword.groovy:95)
at com.kms.katalon.core.webui.keyword.builtin.WaitForElementPresentKeyword.execute(WaitForElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementPresent(WebUiBuiltInKeywords.groovy:343)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$waitForElementPresent$4.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1546970951936.run(TempTestSuite1546970951936.groovy:36)

2019-01-08 22:11:49.683 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_ FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to wait for object to be present (Root cause: java.lang.IllegalArgumentException: Object is null)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.WaitForElementPresentKeyword.waitForElementPresent(WaitForElementPresentKeyword.groovy:95)
at com.kms.katalon.core.webui.keyword.builtin.WaitForElementPresentKeyword.execute(WaitForElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementPresent(WebUiBuiltInKeywords.groovy:343)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$waitForElementPresent$4.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1546970951936.run(TempTestSuite1546970951936.groovy:36)

2019-01-08 22:11:49.690 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_


#7

I have a few questions that may point to the cause of your issue:

1.) Are you using the most current version of the studio (current version is 5.10.1)?

2.) This doesn’t usually make any functional difference, but when you’re specifying the path to any object in the repository, you can omit the ‘Object Repository/’ portion of the path, as the ‘findTestObject’ family of methods already knows to look in the Object Repository. So instead of:

findTestObject(‘Object Repository/App/HomePage/input_searchBox’)

try:

findTestObject(‘App/HomePage/input_searchBox’)

3.) I noticed from the screenshot of the repository that you’ve provided that the input_searchBox object in question has a different icon in the explorer: image than a usual Test Object: image . I’m not sure it makes any difference, but since you mentioned that only SOME of your objects have this problem, it may be worth investigating. At the very least, I would delete the Test Object and recreate it, then try again.


#8

This goes back to my topic from a while ago: Allow for timeout of 0 seconds for WebUI.verifyElement_____ calls.. I’m assuming that OP wants to validate the existence of elements immediately, hence the ‘0’ argument in their original verifyElementPresent() approach.


#9

Thanks for your response @Brandon_Hein.
1.) I am always updating Katalon, so its the most current version.
2.) Removing “Object Repository” part leads to same error, written bellow.
3.) Thanks for notice. When I try to open that element in Katalon GUI on Ubuntu it doesn’t even open. I’ll try to delete/recreate and will let you know if that help.

2019-01-08 23:03:00.917 DEBUG .01 - Test_HomePage_Elements_Visibility_ - 8: verifyElementPresent(findTestObject(“App/HomePage/input_searchBox”), 0)

2019-01-08 23:03:00.942 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/App/HomePage/input_searchBox’ does not exist

2019-01-08 23:03:00.998 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/’ does not exist

2019-01-08 23:03:01.527 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)

2019-01-08 23:03:01.584 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: verifyElementPresent(findTestObject(“App/HomePage/input_searchBox”), 0) FAILED.

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)

at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)

at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$3.call(Unknown Source)

at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)

at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)

at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)

at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)

at TempTestSuite1546974116893.run(TempTestSuite1546974116893.groovy:36)

2019-01-08 23:03:01.601 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_ FAILED.

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present (Root cause: java.lang.IllegalArgumentException: Object is null)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)

at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)

at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$3.call(Unknown Source)

at 01 - Test_HomePage_Elements_Visibility_.run(01 - Test_HomePage_Elements_Visibility_:75)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)

at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)

at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)

at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)

at TempTestSuite1546974116893.run(TempTestSuite1546974116893.groovy:36)

2019-01-08 23:03:01.625 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App/02_Home_page/01 - Test_HomePage_Elements_Visibility_


#10

The thing that’s foxing us is that it fails on Ubuntu but works fine on Win10. Strange.


#11

Gotta be related to this! I imagine it’s why you’re getting a null for that object.


#12

Hi @tgran.sargsyan

Thanks for your provided information. The problem can occur when:

  1. The object doesn’t exist
  2. Katalon Studio could not read the object’s information.
    We think it should be the second one. Please set read and write permission to your project folder by using this command:
chmod -R 755 <your_project_folder_path>

And restart Katalon again.


#13

Thank you all for responses.
Hi @duyluong. Thanks for response. As @Russ_Thomas mentioned, the strange thing is that the same test suite passes on Windows (so I think this objects exist), part of it passes on Ubuntu (so I think that project folder has read/write permissions). Only 2-3 elements cause failings. This also happens on other projects and again only few elements cause failings on Ubuntu (same test cases always pass on Windows).


#14

Have you tried rebuilding that Test Object from scratch? Obviously Ubuntu can open some of your other objects, so it’s got to be something wrong with that particular one (and others maybe).


#15

Deleting/recreating these test objects fixed failing test cases. Thank you very much for your responses, Russ_Thomas, Brandon_Hein and duyluong.


#16

Good to hear! Please consider marking a response as the solution to this problem, so others can quickly find the fix.

Also as an FYI, passing a ‘0’ for the timeout argument in:

WebUI.verifyElementPresent(findTestObject(‘App/HomePage/input_searchBox’), 0)

isn’t going to do what you might expect. Refer to my topic on this from a while back: