Concatenating counter and object value - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Concatenating counter and object value (/Thread-Concatenating-counter-and-object-value) |
Concatenating counter and object value - Anum Saleem - 02-21-2012 In do while loop i want to concatenate txtFirstName with counter value like Kim1 Kim2 code im using for it: Code: counter = 1 Tell me what is wrong with the code?how can i concatenate RE: Concatenating counter and object value - inborntester - 02-21-2012 Aru you sure Fname = Browser("Softronic - HCMS").Page("Softronic - HCMS_2").WebEdit("txtFirstName").Set("Kim") will return Kim. If Kim is the value which is always set in webedit box then when do use it dircetly like Fname = "Kim" + counterstr. if your need is get back the set value is better to use GetROProperty method. RE: Concatenating counter and object value - Ankesh - 02-21-2012 Hi, The question that you are asking is not clear. Let me rephrase your question. Do you want to set the values (such as Kim1,Kim2) in the txtFirstNameField? If yes then use the below code Code: counter = 1 Regards, Ankesh RE: Concatenating counter and object value - Anum Saleem - 02-21-2012 Yes exactly! thank u so much..This code fulfill my requirements. |