This question was asked by Suresh in the comments field.

I am recording using QTP and for some reason QTP does not recognize any upload buttons. For example, start the recording at this site:
Click on the “Browse” button. Notice this click is not recognized by QTP. Please provide some feedback why QTP is not able to recognize this button. Thanks

This is an interesting question and not a typical object identification issue. I thought I will take it up on the blog to make it available to the wider audience.

If you go on the link mentioned above, you will see QTP is not able to record the click on Browse web button. Web buttons are generally associated with input type=submit object but if you see the source of the browse button, you will notice input type=file object.


Now According to Microsoft help, input type=file object creates a file upload object with a text box AND Browse button. Notice the AND. So, in case of input type=file, the text box and browse button are considered part of ONE object. There are no separate objects for QTP to identify.

What can we do to solve this issue?

Enter Web Event Recording Configuration.

  1. Object Spy on the text box/ browse button object reveals that it is a WebFile type Object. QTP webfile object
  2. Using Tools > Web Event Recording Configuration, go to WebFile (under Web Objects tree). Add onclick event. When QTP does not recognize buttons
  3. Set the onclick event settings to Always. Click ‘OK’.QTP onclick werc
  4. Done!. Record the click on browse button, now QTP should be able to identify the click on the button.

If you want to keep track of further articles on UFT (QTP). I recommend you to subscribe by Email and have new UFT articles sent directly to your inbox.

Subscribe to get free updates on UFT!

LearnQTP is the most popular site on UFT (formerly QTP).

Enter your first name and email address below to instantly subscribe and download an eBook on Optimizing UFT Scripts. In future, we will make sure you get new tips & tricks on UFT delivered direct to your email box.

Please check your email and confirm free subscription!