Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can we associate the required addins at run time?
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi All,

Our older versions of our application is developed using activex,VB,.net and Web
We have our new product version which is developed using activex,VB,.net and Web and WPF
That is the main gateway screen is developed using 'WPH' so the test needs 'WPF' Addin also to be associated with other Addins
If we associate this to the test permanently, then it may not work for our older versions of our application which needs only activex,VB,.net and Web. We dont need to associate WPF when executing the same test on older versions of our application.
I am thinking to get the Application version installed in PC and use a If.. Condition statement and associate the required Addins.
So is there a way to associate the required Addins at run time based on our application version? Please let me know if there is a way to do that.

Thanks and Regards,
Pallavi
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
write the below script in a notepad, save it as .vbs , close qtp window, double click the vbs file.
Code:
set q=createobject("quicktest.application")
q.visible=true
msg="enter 1 for older version" &vbnewline &"2 for newer version"
op=inputbox(msg)
if op=1 then
addinlist=array("Web","ActiveX","Visual Basic")
elseif op=2 then
' I dont know about WPF addin, assuming the name is "WPF"
addinlist=array("Web","ActiveX","Visual Basic","WPF")
end if
q.setactiveaddins addinlist
q.launch
'path of test  folder
q.open "D:\MyTest"
q.test.run
set q=nothing
'Once you launch qtp with some add ins selected, you can not add a new add in at run time! by the way i wonder why you are selecting all the add ins!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP not recogonising object during run time Lavanya N 2 3,749 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 12,214 08-27-2015, 10:18 AM
Last Post: supputuri
  Unable to identify "Authentication Required" Dialog shaunysj 2 3,285 08-04-2015, 12:55 PM
Last Post: venkatesh9032
  code required for the following scenarios krithikaachari 0 2,270 09-27-2014, 01:00 AM
Last Post: krithikaachari
  QTP Takes Long time to Run prasaad44 4 4,928 04-10-2014, 01:53 AM
Last Post: prasaad44

Forum Jump:


Users browsing this thread: 2 Guest(s)