Date and time error

Hi, I am getting this error: groovy.lang.MissingPropertyException: No such property: Time for class: 'ClassNotFoundException

This is the line of code it fails on:
assert titles.get(titles.size() - 1).equals(Date & Time)

Extra info:
This line of code precedes the line of code with the date and time. It calls the custom keyword function:

List<String> titles = CustomKeywords.'custom.ff.getTableColumn'(findTestObject('FourteenFish/FF_Trainers/ReviewEducatorsNotes/educatorsNotesTable'), 
1)

This calls on the function in custom.ff:

	@Keyword
	def List<String> getTableColumn(TestObject tableObject, int column) {
		List<String> columnValues = new ArrayList<>()
		WebElement table = WebUI.findWebElement(tableObject, 10)
		List<WebElement> tableRows = table.findElements(By.xpath("tr"))
		tableRows.remove(0)
		for(WebElement row: tableRows) {
			WebElement cell = row.findElement(By.xpath("td["+ column +"]"))
			columnValues.add(cell.getText())
		}
		return columnValues
	}

For context, the custom function I reference checks the text in each row of a table under the ‘Title’ column.
(1) It checks that none of the rows in the ‘Title’ column are empty with:
assert !(titles.isEmpty())

(2) It checks the time and date against the expected time and date with:
assert titles.get(titles.size() - 1).equals(Date & Time)

Here is the full error stacktrace:

Reason:
groovy.lang.MissingPropertyException: No such property: Time for class: Script1582551316022
	at TUP-1231_Trainer_Creates_Educators_Notes.run(TUP-1231_Trainer_Creates_Educators_Notes:38)
	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:337)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1591618475654.run(TempTestCase1591618475654.groovy:25)

Any help would be greatly appreciated!

Welcome leyla.hunn,

I think you should check the type of your objects. It may help you.

println titles.get(titles.size() - 1).getClass().getName()

You may need to compare as strings.

Regards

Hi @ddanneels thanks for the response,

Can I ask what this line of code does? Would it return the elements in the row under title as strings rather than numbers?
And does this still check that the time and date is correct?