Extra objects being added to path

New to Katalon

When doing a record
web I find that extra objects or path(not sure what to call them) are being
added to the Test Object.

Scenario

Testing
in Chrome with Microsoft Dynamics 365 for Finance and Operations

My test is a basic username/password login.

I click on the login line and enter my login, click Ok, then enter my password,
click Ok again.

When I go to run the
test case it fails on entering my login, like it cant find that line.
The Script view shows the following error

Unable to click on
object (Root cause: java.lang.IllegalArgumentException: Object is null

I found in Script
mode its adding an extra path to the Object.

The line where I
enter my login object is called ‘input_Sign in_loginfmt’. In script mode it should look like this

WebUI.click(findTestObject(‘nput_Sign in_loginfmt’))

However when
looking at script mode its showing up as:

WebUI.click(findTestObject(‘Object
Repository/Page_Dashboard/input_Sign in_loginfmt’))

I managed to figure
out if I remove the line “Object Repository/Page_Dashboard” the test
case runs fine.

MY QUESTION

How can I make it so
that it doesn’t add this extra path to prevent my tests from failing

Any time I create a new test case its adding a “path” and causing the test to fail on the first step.

If this helps, all my
captured objects are not in folders just in the default Object Repository.

Thank you in advance

image is worth a 1000 words, can you please post some screenshots what are you talking about?
thanx

1 Like

Here’s an example of a test case I just created

Basic Login test case being run

Error message after test case has been run


Script view

The path that’s causing the issue has been highlighted in bold. Once that’s removed, the test runs without error

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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

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.testdata.TestData as TestData

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 internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘Sign in to your account’)

WebUI.setText(findTestObject(‘**Page_Sign in to your account/**input_Sign in_loginfmt’), ‘test@test.com’)

WebUI.setEncryptedText(findTestObject(‘Page_Sign in to your account/input_reset it now._passwd’), ‘96xNKD8f89AHNfB0wf0D0Q00==’)

WebUI.click(findTestObject(‘Page_Sign in to your account/input_concat(Don t show this’))

WebUI.verifyLinksAccessible()

Login 2 error.PNG

can you also please sent image of OR? how objects are defined - i’m interested of structure of OR

Object repository.PNG

in recorder i think you can choose where to store objects

image.png