While Wend condition - 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: While Wend condition (/Thread-While-Wend-condition) |
While Wend condition - raaj123 - 06-11-2012 hi sir, Please help me while condition is not working it is directly moving to next. pls see the below code. Code: empid=ASF467 Regards, Praveen raaj. RE: While Wend condition - ravi.gajul - 06-11-2012 Please use while strcomp(cstr(empid),cstr(eempid))=0 Strings cannot be compared with "=" operator RE: While Wend condition - raaj123 - 06-11-2012 hi dude, my string is ASF467 this is for both empid & eempid Code: c=strcomp(cstr(empid),cstr(eempid)) as u told above line it is displaying value as "-1" instead of "0" what to do pls help me. Code: while strcomp(cstr(empid),cstr(eempid))=0 regards, Praveen raaj. RE: While Wend condition - ravi.gajul - 06-11-2012 Looks like there is a space in one of the variables value and so is the result -1 Please try Code: while strcomp (cstr(trim(eempid)),cstr(trim(empid)))=0 |