Please correct this script

WebUI.store(executeScript('javascript' {var d=new Date();return 'test+'+d.getFullYear()+((d.getMonth()+1))+d.getDate()+d.getTime()+'@gmail.com';}))
WebUI.setText(findTestObject('Object Repository/Page_  EPAGE/input_email'), '${mail}')

Hi Marie,

What error are you getting?

From what I can see when you’re setting a variable from object to your code you should use this:

WebUI.setText(findTestObject('Object Repository/Page_  EPAGE/input_email'), [('mail')])

Thanks for checking!

I’m seeing this error:

“Test Cases/SignUp FAILED because (of) Variable ‘store’ is not defined for test case.”

Hello,

why do you use such a difficult approach using Javascript? I assume that you want to have unique email, so you can use this code:

long ts = System.currentTimeMillis() / 1000LString mail = ts + "@gmail.com"WebUI.setText(ObjectRepository.findTestObject('Object Repository/Page_  EPAGE/input_email'), mail)

I think the ‘WebUI.store’ is the wrong one. Since there’s no ‘store’ method in the ‘WebUI’ class

I’m using Katalon 5.3.1 by the way. Maybe the latest version already has the ‘store’ method. I can’t confirm. But as far as I know ‘store’ method is not included in the ‘WebUI’ class.

1 Like