Is there a way to interact with a browser object, and access its properties such as VisibleOnScreen or ObjectIdentifier?

I currently use TestComplete to test web pages. That tool allows me to access properties of an browser Object such as VisibleOnScreen or ObjectIdentifier. I cannot find a method to access these properties in Katalon. As example, I need to know if a browser object is “visible” or “Visibleonscreen”… is the object “Enabled”? We are having great difficulty using the extremely limited properties provided (such as “xpath” or “id” ) Where or how can i access these Properties of a browser Object?

Hi there,

In order to access other native properties of a test object, you will need to get the object using find webElement.

Example:

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword

import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(GlobalVariable.G_SiteURL)

def testObject = WebUIAbstractKeyword.findWebElement(findTestObject (‘Page_CuraHomepage/btn_MakeAppointment’))

‘Verify if the object is enalbed or not’
assert testObject.enabled == true

Some properties you can access such as:

enabled
displayed
size
location
rect
selected
tagName
text

For ‘VisibleOnScreen’, we don’t have that property. In case you want to verify if the test object is visible on current screen or not, we advise you to use 'Verify Element Visible In Viewport’ keyword.

Hope that somehow resolve your current obstacles with working with object.

Thanks