I have set of Text boxes like Last Name , Country , State , City. I want to verify the text entered in each text boxes. I had used “WebUI.getAttribute(findTestObject(‘XYZ/Last Name field’),
‘value’)” for Last Name and it worked for me. And Same method i used in remaining text boxes but it’s not returning any Value entered. Here is my Script.
String L = WebUI.getAttribute(findTestObject(‘XYZ/Last Name field’),
‘value’)
Lemme correct it. it’s Get attribute in the script. Get text was mistake. I Used the Get attribute and it’s working for only one text box and remaining text boxe’s are failed to return the value.
String M=WebUI.getText(findTestObject(‘xyz/LastName’),FailureHandling.CONTINUE_ON_FAILURE)
String L = WebUI.getAttribute(findTestObject(‘XYZ/Last Name field’),
‘value’)
WebUI.verifyEqual(M, L, FailureHandling.CONTINUE_ON_FAILURE)
(This above code is working fine)
(Below Mentioned code is not working)
String A = WebUI.getAttribute(findTestObject(‘XYZ/Country’),
‘value’)
String B = WebUI.getAttribute(findTestObject(‘XYZ/City’), "PUT-YOUR-ATTRIBUTE-HERE")
String C = WebUI.getAttribute(findTestObject(‘XYZ/State’), "PUT-YOUR-ATTRIBUTE-HERE")