Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP and Visual basic
#1
Not Solved
Hi ,

I am using QTP 9.2 with vbscript. However I find that certain functions are required that are created in Visual basic.

Could you tell me how to use Visual basic with QTP 9.2 to create a script that can be run ,

Thank you
Sonia
Reply
#2
Not Solved
Most of the vbscript functionalities can be used in QTP 9.2, ONe good way to check if a particular function can be used or not is to run a search on it in the QTP help manual.
Reply
#3
Not Solved
One reason why you don't get many replies is because you'r questions don't have much details.It is always a good Idea to include examples and details.Helps us to understand your questione better.
Reply
#4
Not Solved
Thank you for the reply. I was actually referring to Quality center OTA API functions . I have not yet coded any of them but an example is the Link object function that can link a defect to a test .

Sonia
Reply
#5
Not Solved
Hi

Below is the code ...........
Code:
Private Sub LinkBugToStep()
    Dim linkF As LinkFactory
    Dim link As link
    Dim ilink As ILinkable
    Dim bugF As BugFactory
    Dim Bug As Bug
    Dim stepsList As list
    Dim runF As RunFactory
    Dim run1 As Run
    Set runF = tdc.RunFactory
    Set run1 = runF.Item(71)
    Dim stepF As StepFactory
    Dim step1 As Step
    Dim filter As TDFilter
    Dim stepList As list
    Set stepF = run1.StepFactory
    Set filter = stepF.filter
    Set stepsList = filter.NewList
    Set step1 = stepsList.Item(1)
    Set bugF = tdc.BugFactory
    Set Bug = bugF.Item(26)
    Set ilink = step1
   Set linkF = ilink.BugLinkFactory
   Set link = linkF.AddItem(Bug)
   link.Post
    ' Disconnect tdc

End Sub
......................

The above is a sample Visual basic function that I need to integrate with QTP scripting so that when the defect(bug) is created it is also linked to the test that created it .
But since VB script is different .. how can I use this function ?

Thank you
Sonia
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Estimate for preparing a basic test script QTPBeginner48 4 2,792 02-25-2014, 03:45 PM
Last Post: guin.anirban
  Basic error handling RandomGrin 3 3,732 10-12-2013, 07:50 PM
Last Post: basanth27
  Flight reservation basic parameterization not working on qtp 11.5 srs246 0 3,573 01-08-2013, 10:14 AM
Last Post: srs246
  3 basic questions..please help Blizna 5 4,766 07-09-2010, 12:21 PM
Last Post: sasmitakumari
  Visual Basic Application Recording dlopes 2 2,370 07-09-2010, 10:21 AM
Last Post: Saket

Forum Jump:


Users browsing this thread: 2 Guest(s)