Value type

i need to give different value everytime in LOGIN field so can we generate the random different text everytime for the SET TEXT keyword.??

Hi kapil,

There are many ways to generate random text based on this page: https://stackoverflow.com/questions/8138164/groovy-generate-random-string-from-given-character-set. Below is a sample code using one of the provided way from this page:

import org.apache.commons.lang.RandomStringUtils
String charset = (('A'..'Z') + ('0'..'9')).join()
Integer length = 9
String randomString = RandomStringUtils.random(length, charset.toCharArray())
WebUI.setText(findTestObject('Page_Login/txt_UserName'), randomString )