How uniqule Identify WebEdit in QTP - 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: How uniqule Identify WebEdit in QTP (/Thread-How-uniqule-Identify-WebEdit-in-QTP) |
How uniqule Identify WebEdit in QTP - QTP9.2 - 01-24-2013 I have an application where 6, 7 edit fields. User can add or delete edit field as well. I want to populate one Edit field against label "ABC". on normal recording it looks like this: Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("FA_CHAR:1$CHAR_VAL").Click How to identify uniquely this field. Regards, RE: How uniqule Identify WebEdit in QTP - ssvali - 01-24-2013 Use index property ... (01-24-2013, 02:19 PM)QTP9.2 Wrote: I have an application where 6, 7 edit fields. User can add or delete edit field as well. I want to populate one Edit field against label "ABC". RE: How uniqule Identify WebEdit in QTP - QTP9.2 - 01-24-2013 Can you write one liner syntax ... as given in example. Secondly, index will not be change when order of the field change ? if one write this Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("FA_CHAR:1$CHAR_VAL").Click Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("FA_CHAR:"&RowNum&"$CHAR_VAL").Click what does this means RE: How uniqule Identify WebEdit in QTP - harishshenoy - 01-28-2013 In the above line of code: 'RowNum' has been parameterized or regular expression been used. i.e u can add the value to the 'RowNum' at the run time like below , it will work for all the values.. Code: RowNum = 1 this is same as : Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("FA_CHAR:1$CHAR_VAL").Click Ex2: Code: RowNum = 2 this is same as : Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("FA_CHAR:2$CHAR_VAL").Click other question about INDEX: Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("index:=0").set "your value" Code: Browser("User").Page("Field Activity").Frame("FA_TYPE_CHAR").WebEdit("index:=1").set "your value" Note: indexing starts from 0 Regards, Harish |