title: How to get dialog box text using UFT script?
body: <p>I am using HP UFT for browser automation in IE browser and here i have one problem i.e Validating the Cards,below are the dialog message will display as per scenario and i need to write if condition based on dialog text,for examples</p>
  
  <p>Scenario texts:  </p>
  
  <ol>
  <li>Card is valid for registration  </li>
  <li>Card No is already registered  </li>
  <li>Card is blocked  </li>
  <li>Card is not valid for registration.  </li>
  </ol>
  
  <p>All the above dialog box message will comes at one point i.e click on validate card button and please provide one simple script to get that message dynamically in HP UFT .</p>
  
  <p>My Code for Invalid Card number:</p>
  
  <pre><code>Browser("name:=Customer").Dialog("text:=Message from webpage").WinButton("text:=OK").Click
  card_number=Browser("name:=Customer").Page("title:=Customer").WebEdit("name:=customerVo.cardNo").GetROProperty("value")
  card_status=Browser("name:=Customer").Dialog("text:=Message from webpage").GetROProperty("value")
  If card_number="" Then
  
  Reporter.ReportEvent micWarning,"Verify Card Number","Scanned Card number is already registered/Invalid Card Number"
  DataTable.value("card_status","customer_enrollment")=card_status
  else
  Remaining positive script
  DataTable.value("card_status","customer_enrollment")=card_status
  End If
  </code></pre>
  
  <p>IN above code i want to print particular scenario message in excel for each records, as based upon card validation status,please help.</p>