Frequently Asked Coding Questions During Interview on UFT

17
623
Spread the love
  • 15
  • 12
  • 6
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
    34
    Shares

 

Settings to be performed in Mercury tours application before creating the script:-

1. start server (start->programs->mercury tours->start server)
2. open mercury tours application
3. login as admin and mercury as password
4. Select Data driven popup error
5. Submit

How to get Test Path in QTP/UFT?

 


Set qtApp = CreateObject("QuickTest.Application") ' Create the Application objectqtpApp.Test.Location
TestLoc = qtApp.Test.Location
MsgBox TestLoc
 

Another way..


msgbox Environment("TestDir")
 

However, you need to save the test before the run. Else will give
1.not save
2.temp directory as output.

How to Send Email via VBScript?


Function SendMail(SendFrom, SendTo, Subject, Body)
Set objMail=CreateObject("CDONTS.Newmail")
ObjMail.From = SendFrom
ObjMail.To = SendTo
ObjMail.Subject = Subject
ObjMail.Body = Body
ObjMail.Send
Set objMail = Nothing
End Function
Function SendMail(SendTo, Subject, Body, Attachment)
Set ol=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
ol.Quit
Set Mail = Nothing
Set ol = Nothing
End Function
 

How to add Defects to Quality Center from UFT/QTP/Vbscript?
Here is a sample code to Connects to Quality Center (TestDirector) from a QuickTest test and adds a bug to the database. This code was taken from here


Dim TDConnection
Set TDConnection = CreateObject("TDApiOle.TDConnection")
TDConnection.InitConnection "http://hpqc/tdbin" ' URL for the DB
TDConnection.ConnectProject "TD76","abc","xyz" ' Valid login information
If TDConnection.Connected Then
MsgBox("Connected to " + chr (13) + "Server " + TDConnection.ServerName _
+ chr (13) +"Project " + TDConnection.ProjectName )
Else
MsgBox("Not Connected")
End If
'Get the IBugFactory
Set BugFactory = TDConnection.BugFactory
'Add a new empty bug
Set Bug = BugFactory.AddItem (Nothing)
'Fill the bug with relevant parameters
Bug.Status = "New"
Bug.Summary = "Connecting to TD"
Bug.Priority = "4-Very High" ' depends on the DB
Bug.AssignedTo = "admin" ' user that must exist in the DB's users list
Bug.DetectedBy = "admin" ' user that must exist in the DB's users list
'Post the bug to database (commit)
Bug.Post

 

Don't miss out!
Subscribe To Newsletter
Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 15
  • 12
  • 6
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
    34
    Shares

17 COMMENTS

  1. You have to offer away for example an e-book or hold a competition. Two significant
    things should be considered when tracing both low quality and high volume joins.

  2. That you need to learn it an individual will apply this strategy soon. Well, I
    checked my own account, and it was not listed on the list of articles Got submitted.

    • Thanks HollisRapke21,
      You are free to take up these strategies. I blog as I encourage people to take up these strategies. Secondly I will surely find out a way to list these articles

      Regards,
      Animesh

  3. I want to hear your triggers for blogging, furthermore the reasons you visit blogs.
    When you start to do a search for a niche for business you should
    start with something that you know.

    • Hello SamualHawker27,
      I do not follow any niche and micro niche as such, I blog as I love to share. But if you are targetting some area and want to stick to that to get better money out of the advertiser, yes you need to find an niche. There are plenty of videos available in youtube.

      Regards,
      Animesh

  4. Start performing some abdominal training methods and some strength training exercises a few days 7 days.
    A) Give subscribers a very important gift as a reward for giving their email address and details.

  5. Wiith Adobe Photoshop, you will be able to boost or decrease contrast,
    brightness, huge, and even color intensity.
    Flowers come in a range of colors, and when you addd stems and
    vines, you may get an incredible custom tattoo design.
    In most cases tthis isn’t an issue as users can order prints completely from
    the sharing site.

  6. Thanks , I have just been looking for information approximately this subject for a while and
    yolurs is thee best I have foujd oout till now. But, what in regards to
    the bottom line? Aree you sure about the source?

  7. Great blog here! Also your web site loads up very fast!
    What web host are you using? Can I get your affiliate link to your host?
    I wish my website loaded up as fast as yours lol

  8. Google

    That may be the end of this report. Right here you will locate some internet sites that we assume you’ll enjoy, just click the hyperlinks.

  9. Google

    Here are some links to sites that we link to simply because we believe they may be really worth visiting.

  10. Google

    Here are some links to websites that we link to simply because we consider they are really worth visiting.

  11. F*ckin’ remarkable issues here. I am very satisfied to peer your article. Thanks a lot and i am taking a look forward to touch you. Will you kindly drop me a e-mail?

LEAVE A REPLY

Please enter your comment!
Please enter your name here