groovy.lang.MissingPropertyException

@costea.georgian89

I modified your original project. Now it runs fine.

Velocify 2.zip (122.2 KB)

The most notable part for you would be this portion in the Test Case test1:


def address = CustomKeywords.'com.costea.EmailUtil.getMyAddress'() 
WebUI.setText(findTestObject('Page_Sales Funnel - TexasLending.com/input_Email Address_email'), address)

//WebUI.verifyElementText(findTestObject('Page_Sales Funnel - TexasLending.com/input_Email Address_email'),
//    email.get(0)) 
def v = WebUI.getAttribute(findTestObject('Page_Sales Funnel - TexasLending.com/input_Email Address_email'),
        'value')
def result = WebUI.verifyEqual(v, address)
if (result) {
	WebUI.comment("Good! The address ${address} is what I expected")	
} else {
	WebUI.comment("Nein, die Adresse ${address} ist nicht das, was ich erwartet habe")
}

You should use WebUI.getAttribute(testobject, 'value') in order to retrieve the value out of the <input value="..."> tag.
WebUI.verifyElementText() does not work to retrieve and verify the @value attribute of <input>.

Why?

You should be aware, HTML <input value="foo"> tag contains the text("foo") you put as @value attribute. It does not look like <input>foo<input>. See some resources about HTML, like this

2 Likes