Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to validate file Extension in qtp 9.2
#1
Solved: 10 Years, 8 Months, 3 Weeks ago Question 
hi
Chetan here
I want to check the file extension as per my project requirement.
i want to check either file extension is .jpg or .gif.
so how can i do with reguler expression?

Let me know that if any other way to check that.
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
This post on validate files extension using QTP might help you
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
1)Get File NAme using Getroproperty
2)Use the Right Function to get the last 3 characters
3)check if it is "jpg" or "gif"
or

objRegExpr.Pattern = ".*.jpg|.*.gif"

Regards
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to validate the dyanamic content using QTP? thirna4word@gmail.com 3 3,850 10-03-2017, 08:47 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)