How to proceed in QTP when all fields are prefixed with ctl00_ContentPlaceHolder1 - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to proceed in QTP when all fields are prefixed with ctl00_ContentPlaceHolder1 (/Thread-How-to-proceed-in-QTP-when-all-fields-are-prefixed-with-ctl00-ContentPlaceHolder1) |
How to proceed in QTP when all fields are prefixed with ctl00_ContentPlaceHolder1 - nistalaramesh - 10-12-2013 In my web Application all controls are prefixed as below example: ctl00$ContentPlaceHolder1$txtAssetNumber ctl00$ContentPlaceHolder1$txtAssetDesc ctl00$ContentPlaceHolder1$txtRefAssetNumber This is a .Net web Application I am using HP UFT11.5. Qtp Identifying all text boxes like "ctl00$ContentPlaceHolder1$txtAssetNumber" and even for dropdowns, Radio Buttons, Checkboxes the prefix "ctl00$ContentPlaceHolder1$" comes in place. The Prefix changes from page to page if the same text box present in different pages. In Coding developer named the text box as "txtAssetNumber" But runtime the name changes dynamically as above mentioned. But txtAssetNumber is the actual field name. Attaching the view source of the page. Code: <div class="middlemain"> How can i proceed scripting using OR in QTP ?? RE: How to proceed in QTP when all fields are prefixed with ctl00_ContentPlaceHolder1 - pradeep singh - 10-16-2013 You can use regular expression for name property in OR. For ex:".*txtAssetNumber" |