Quick test professional

QTP Tips QTP codes QTP Faqs and more

Mohan Kumar Kakarla

526 Comments »

  1. Nice work ra mohan….good….

    all the best…

    murali

    Comment by Murali | February 18, 2008 | Reply

    • Hi Mohan,

      I am new to this blog…
      I have just started leaning QTP, but could not understand how to implement it practically.
      In starting I am trying to record a script on yatra.com booking engine to search the flights and read the valued (Origin City, Destination City, Depart date and Return date) from data table. But I am not able to do this….
      So please guide me how should I start learning QTP

      Regards
      Vishal

      Comment by Vishal Gupta | May 26, 2009 | Reply

    • Hi Mohan,

      i am new to automation Testing..i am facing one Problem in real time. Please help me..

      Actually my problem is i have one edit box, Which contains some XML code. I want capture that XMl code and paste it in notepad and save as XMl file. After that i need to compare two xml files.

      Please give me solution as early as possible…..

      Thanks

      Ram Mohan

      Comment by bogerams | March 25, 2010 | Reply

      • Hi,

        I am new to automation testing. I have one editbox in web page, which contains some xml code. I want to capture that xml xode and paste it in notepad and save as xml file. After that i need to compare two xml files. Please give me solution ASAP.

        Regards,
        Sukesh.

        Comment by sukeshnaidu | December 23, 2011

    • Hi Mohan,

      I am using QTP 10.0 and I am trying to compare 2 text files and send the difference to 3rd file. The first file has combination of both English and French text.
      After comparing 2 files the 3rd file shows that there is difference and it is taking all french characters as special characters.

      I did check register entries >> Language options and in QTP >>Tools >>Option >> General >> Text recognition where it does support both Languages English and French.

      Please advice

      Thank you
      Smitha

      Comment by Smitha | September 15, 2010 | Reply

    • Hi Mohan
      iam also working on qtp
      i need some guidlines from u r side
      plz send me u r gmailid

      Comment by Anjaneyulu | December 31, 2010 | Reply

    • Hi Mohan,

      I’m really happy that i’m just sitting next to you.. i will disturb you now directly..

      Comment by NareshKumar Bonu | April 13, 2011 | Reply

    • Hi Mohan,

      Do you have any idea what is the unique Identification for Web Elements similar to HWND for Windows? I.e. what is the unique property for WebButton

      Sumit

      Comment by Sumit S | December 12, 2012 | Reply

  2. Hi,

    Great work.

    Need a help.I am comparing two separate external excel sheets, cell by cell. I mean first cell of first sheet should be compared with first cell of second sheet. Also as the input file may be of any type, I wanted to pass it through a piece of code, where it gets all vacant rows deleted and a proper format is given to this file, before it actually goes as an input to the test.

    Comment by KK | February 26, 2008 | Reply

    • Hi Mohan,

      I am writing script in QTP. I have put my data in excel file which has mutiple sheets.
      I have uploaded this script in Test Resource of QC.What will be code in my QTP Script for relative path?

      Comment by Rashmi | November 28, 2012 | Reply

  3. Hi KK,
    reply sent to your mail.hope it solves

    Comment by quicktestprofessional | February 27, 2008 | Reply

  4. Hi Mohan,

    Could you please help me out how to Accessing MS-Access dB file kept in QC as attachement that is intended for Test Data file?
    So far I am using .xls file that is kept in QC alongwith Test Script. That .xsl is inturn included in the resource settings, so that I am able to access the test data file successfully.

    Thanks in advance.

    Best regards
    Suresh

    Comment by Suresh | February 27, 2008 | Reply

  5. Thanks a lot…absolutely hits the target.

    Comment by KK | February 27, 2008 | Reply

  6. Hi suresh,
    You have to use the Quality Center Open Test Architecture to do this. This guide can be available to down load at

    http://javachip.org/Tutorial/TD%20Tutorial.pdf

    Step1: Use the QC-OTA to down load the ms access file to the local system

    Step2: use some automation code to export the contents of the access db to excel

    Step3. Use datatable.import to import the sheet.

    Hope this will solve the issue.

    Comment by quicktestprofessional | February 28, 2008 | Reply

  7. Hi Suresh,

    Please forgive me dude. I am taking back my words” As per my knowledge No. ,it is not possible to establish ODBC connectivity i.e with DSN/withour DSN, the Access DB which is residing at QC directly”Said your earlier mail.

    Now I am saying ‘Yes” it is possible to establish ODBC connectivity to QC directly. After you asked that question , I have done may experiments from morning onwards to do the same. Finally I got the way to do that. Here are the steps

    create object for fso
    Set fso=createobject(“Scripting.FileSystemObject”)

    2.use pathFinder.Locate method to get the path of the mdb file

    Msaccessfile= fso.getFile(PathFinder.Locate(“[QualityCenter] Subject\xx\xx\msaccess.mdb”))

    3.Use the “Msaccessfile” created in step2 as the path to connection string.

    Sounds great. Thank you very much for ignited my ideas and mind.

    Comment by quicktestprofessional | February 28, 2008 | Reply

  8. Hi KK,

    Great site. Can you tell me how to compare two xml files using QTP.

    Thanks,

    Comment by sam | February 29, 2008 | Reply

  9. Sam,

    Try this code.
    Dim description, filepath
    Set xmlDoc1 = CreateObject(“Msxml2.DOMDocument”)
    xmlDoc1.load(“C:\Documents and Settings\mohan.kakarla\Desktop\1.xml”)’file 1
    Set xmlDoc2 = CreateObject(“Msxml2.DOMDocument”)
    xmlDoc2.load(“C:\Documents and Settings\mohan.kakarla\Desktop\2.xml”)’file 2
    Set ElemList1= xmlDoc1.DocumentElement.ChildNodes
    Set ElemList2= xmlDoc2.DocumentElement.ChildNodes
    If ElemList1.length=ElemList2.length Then’ check weather both xml file has same number of childnodes
    msgbox “Both XML files have same number of Child nodes”

    For i = 0 to ElemList1.length-1

    If ElemList1.item(i).Text=ElemList2.item(i).Text Then
    msgbox “child element:”&i &” is same in both XML files”
    Else
    msgbox “child element:”& i &” is not same in both XML files, In XML file 1, The valueis:”&ElemList1.item(i).Text &” and In XML file 1, The value

    is:”&ElemList2.item(i).Text
    End If
    Next
    End If

    Comment by quicktestprofessional | March 3, 2008 | Reply

  10. Hi Mohan,

    Here I want develop scripts thrh QTP but my application can be installed in remote machine (server)…..

    Here I am trying with VNC software to do that task….

    QTP installed in local machine…
    application in remote machine….

    hope u got my question….so please provide if any new solutions.

    Thanks,
    –suman

    Comment by sumanreddy | March 6, 2008 | Reply

    • Pls

      Comment by Khursheed | December 16, 2009 | Reply

  11. Hello Mohan,
    This is the first time I am seeing your web site. It’s very good and very much useful for a fresher who is interested in learning QTP. Thank you very much for good information sharing.

    Cheers,
    Swetha

    Comment by Swetha | March 6, 2008 | Reply

  12. Well Done Mohan……thanks a lot for all the Information provided and Knowledge shared…….Great Work
    Absolutely Fantastic………Why dont i get such links in Google….if its there i think ….. Mohans link should be right in First 5 or 1O hits displayed by Google

    Comment by Karthik BM | March 6, 2008 | Reply

  13. hello,

    please let me know who to appear for QTP certification and also if possible please send study material and question papers for the same.

    waiting for your reply.

    regards,
    shirish

    Comment by Shirish | March 6, 2008 | Reply

  14. shirish,
    Refer the following link for the info about QTP certification.

    http://www.sqaforums.com/showflat.php?Cat=0&Board=UBB20&Number=439709&fpart=&PHPSESSID=

    Comment by quicktestprofessional | March 6, 2008 | Reply

  15. Hey Mohan,

    You are doing excellent job, I have gone through all your examples which were fantastic, I hope that i will learn many things from your blog.

    Can you just help me, what do you mean by TEST DATA, when that will be prepared? Will it be given by client?

    Srinivas.

    Comment by Srinivasulu Reddy Vallelas | March 12, 2008 | Reply

  16. And also i would like to know few other thing related to QTP,

    What all the roles and responsibilities for QTP tester on the project?

    Can you please precise me as a automation tester, What all the things we will do while executing the project?

    How can i connect TD 5.0 with QTP 8.2, Which i have it on my system? Please explain with proper steps?

    Cheers,
    Srinivas

    Comment by Srinivasulu Reddy Vallelas | March 12, 2008 | Reply

  17. Can you please provide me any example for INOVOKE command in QTP 8.2? I mean to say how will we use this command?

    Srinivas

    Comment by Srinivasulu Reddy Vallela | March 12, 2008 | Reply

  18. Srinivas,

    please do not expect any interview questions here

    Comment by quicktestprofessional | March 12, 2008 | Reply

  19. Hi,

    How to access the inner link inside the DIV.Can I access that using some loops(for,do …while…).

    Pls, help me

    Sample code

    Apparel
    Books and DVDs
    Footwear
    Gifts
    Grooming
    Horse Apparel
    Stable Supplies
    Health Care
    Tack & Strap

    Comment by prasanna | March 13, 2008 | Reply

  20. Hello Mohan,
    Any idea whether QTP 9.2 works against UG graphics and CADD Designs.We are doing lot of Analog and Low level recording at this time.I am not sure if there are special addinns like TE to achieve this in a better way.Let me know when you get a chance. Thanks

    Your Website is Impressive.

    Pradeep

    Comment by Pradeep | March 14, 2008 | Reply

  21. Pradeep,
    as per my knowledge , there is no seperate add-in for CADD designs.
    but you can get TE(TerminalEmulator) addin.

    Comment by quicktestprofessional | March 14, 2008 | Reply

  22. prasanna,

    did you seen how the step will be generated when u click on a link in the recording mode.

    Comment by quicktestprofessional | March 14, 2008 | Reply

  23. Hello Mohan,

    I am working on automating a web based Java application,but all the objects are identified as “JavaObject”. i,e all objects like Buttons, Edit boxes and List boxes are identified as only generic “javaObject” but not JavaButton, JavaEdit etc. For example a button is identified as
    JavaObject(“Button”) and a click operation on that is identified are click of window co-ordinates. Even in an object which looks like List box is identified as JavaObject(“List”) and selecting values as click of co-ordinates. Due to this parameterising values becomes problematic.
    Do you think this is because of the way the application is developed or is there is any other way we can identify the right object. I am aware that QTP has virtual object mapping, but am not sure if it works well in this case.

    Can you suggest a solution?

    Thanks
    Archana

    Comment by Archana | March 14, 2008 | Reply

  24. Archana,
    For web application , irrespective of the technology(atleast .net and java), it should record them as web objects only. i.e webedit, weblist etc.
    May be your qtp is having some problem.Now open your qtp and deselect java addin and try to spy the application and see how it is showing.

    correct me if i am wrong.
    thanks,
    mohan kakarla

    Comment by quicktestprofessional | March 14, 2008 | Reply

    • Hi kk,
      pls let me now any example on reuseable action and scripts on actions like split action,reuseable action

      Comment by Mahesh | September 10, 2010 | Reply

  25. Thanks for such a quick response Mohan. This application is an Oracle client which is java based , which is initially launched through web.I probably confused you in the first query.So we may ignore the web part. I have tried this using only Oracle add-in , only java add-in and combination etc. But in all the ways the problem remains as i explained above.All the objects are identified only as JavaObjects . I donno if I am supposed to re install the add-ins or take some additional Plug-ins.

    The Product information is as follows:
    Oracle Applications : 11.0
    Oracle Forms : 4.5.10
    RDBMS : 8.1
    Application Object Library : 11.0

    Thanks
    Archana

    Comment by Archana | March 14, 2008 | Reply

  26. Hey Mohan,

    can you expalin how to build and implement data driven framework in qtp?

    I am really tired of asking this question but nobody explains it.

    Plz plz plz let meknow how to build and implement it step by step as i m an stupid kinda girl..lol

    Thanks In adavnce
    Mamta
    Philadelphia PA

    Comment by Mamta | March 20, 2008 | Reply

  27. Mohan,

    One more thing , I came back in comment section actaully was to appreciate your great efforts!

    Well done bravo! keep it up!

    Mamta

    Comment by Mamta | March 20, 2008 | Reply

  28. Mamta,
    Check your mail

    Comment by quicktestprofessional | March 25, 2008 | Reply

    • Hi mohan ,
      i m feed up with this question like frame work (keyword and data driven )could u pls send me to contactmaheshk@gmail
      thanks& Regards
      mahesh

      Comment by Mahesh | September 10, 2010 | Reply

  29. Hi Mohan,

    For the Oracle add-in query raised earlier,when I recorded the application using only oracle add-in the javaobjects got identified appropriately. But Im facing another issue now , i.e the recorded while reexecuting is throwing “Unspecified Error” at some places in the code.

    A sample recorded code is as follows:

    JavaWindow(“Engineering Change Orders”).JavaEdit(“ECO_DEPARTMENT_0″).Set “DSM”
    JavaWindow(“Engineering Change Orders”).JavaEdit(“CHANGES_REASON_CODE_0″).SetFocus
    JavaWindow(“Engineering Change Orders”).JavaDialog(“ECO Customizations”).JavaList(“XXAM_ENG_ECO_SPECIAL_ENG_SPECIAL_ME”).Select “Assignments List”

    But when I re-run the same code, it throws an unspecified error at all the “set” operations. I have used
    Javaedit(…).Object.settext “abc” which works fine.

    But the application flow needs “setfocus” operations , keyboard entries like mictab or micenter as part of navigation. But I am unable to find appropriate methods under the “.Object” to do this. I have tried options like Object.setfocusable(“True”) object.settext “” etc but the required operation of setting the focus on the edit box is not happening.

    Can you please suggest a solution for this!

    My application is on Oracle Forms 4.5 where as Oracle add-in 8.2 says its supports from Oracle Forms 6.0 . Could this be the problem ?
    Also requested HP for a Patch of Oracle and installed the same but of no use.

    Can u please let me know any comments of yours on this…

    Thanks!
    Archana

    Comment by Archana | March 28, 2008 | Reply

  30. Archana,
    Sorry for the delayed reply.
    I do not have any java application in my system to test your code.I can give you some direct and indirect ways.

    # If the .set method is giving error, you can instead go for .Type method.

    # try .Activate method instead of .setfocusable

    if this is also not working use SendKeys with micTab to achieve , explained below.

    #for keyboard entries like mictab or micenter as part of navigation you can go for SendKeys

    Set WshShell = CreateObject(“WScript.Shell”)
    WshShell.AppActivate “Put the label of the browser” ‘ Activate the browser window
    wait(3)
    WshShell.SendKeys “^f” ‘ The caret (^) represents the CTRL key.
    wait(2)

    object.SendKeys(string)
    object A WshShell object.
    string The string value indicating the keystroke(s) you want to send.
    The SendKeys method will send keystroke(s) to the active window. To send a single character (for example, x), use “x” as the string argument. To send multiple characters (for example, abc), use “abc” as the string argument. You can also send special characters such as SHIFT, CTRL, and ALT, which are represented by the plus sign (+), the caret (^), and the percent sign (%), respectively.
    For more information on the SendKeys method and other special keys, such as the backspace or a function key,

    Comment by quicktestprofessional | March 31, 2008 | Reply

  31. Thank You mohan for your suggestions. Have tried a few options earlier, but not supported with application. Shall try the Sendkeys option and update you.

    Thanks again for all your time!
    Archana

    Comment by Archana | April 2, 2008 | Reply

  32. Hi Mohan,
    I have a query.
    The thing is that we have designed an automation framework in QTP that works great.
    Now I would like to encrypt its code so that the actual user cannot copy/change its functional libraries.
    Can this be done, pls let me know.
    Also let me know ur mail id..so that I can contact u regarding this..
    Thanks

    Comment by hims | April 3, 2008 | Reply

  33. Hims,

    It is not possible to encrypt the VBS files.
    In general you can encrypt the vbs files with the aid of some tools but qtp does not able to use them.
    Instead what u can do is create code in dot net and make them dlls and regester them and you can use them.
    But writing code in dot net for the objects(webtable,editbox etc) is not possible.You can write the code in dot net only upto framework level.

    mohan kumar kakarla

    Comment by quicktestprofessional | April 3, 2008 | Reply

  34. Hi
    i am tying to write the value to an Xl sheet and also tring to Sort by Column(accending), can u please Give some comments for each step. so that i can modify the same accordingly.

    Regards
    Sharma

    Comment by Sharma | April 3, 2008 | Reply

  35. Sharma,
    Comments added for the sorting code.
    you can find that here

    http://quicktestprofessional.wordpress.com/2008/02/26/excel-sortingascending-descending-by-rows-and-columns/

    Comment by quicktestprofessional | April 3, 2008 | Reply

  36. hi, thanks but have one small querie

    “Set objWorkbook = _
    objExcel.Workbooks.Open(”C:Documents and Settingsmohan.kakarlaDesktopDocs1.xls”)” is this in one line or tow diffrent lines of code..
    if it us one line .then please do correct the same…

    regars
    Sharma

    Comment by Sharma | April 3, 2008 | Reply

  37. HI dude..

    got the answer , but i need to pass the values using a Variable so that the search should be for that column
    EX: if we have 3 column Age Fname Lname
    i need to sor for Fname First and Age next and the other one for the next time ,so i need to know how can we achive this..

    regards
    Sharma

    Comment by Sharma | April 3, 2008 | Reply

  38. HI Mohan,

    Fantastic job which you are doing.

    Thanks in anticipation

    Warm regards,
    C.M.Reddy Rondla

    Comment by Chandra Mohan Reddy Rondla | April 5, 2008 | Reply

  39. hi mohan..
    first of all thanks a lot for the excel code which i got it from ur site.. That is comparing two sheets and coloring the cells. i have made a little modifications in ur code and used it. Say like i have colored only the used cells in the first row. But in that i am not able to see the border of the cell. I want the border of the cells also. How to make border of a cell visible?? Can u pls help me?

    Comment by Saranya | April 8, 2008 | Reply

  40. Saranya ,
    You can find many things about the excel automation here

    http://msdn2.microsoft.com/en-us/library/aa269740(office.10).aspx

    Comment by quicktestprofessional | April 8, 2008 | Reply

  41. Thanks a lot.. I will find it out.. :-)

    Comment by Saranya | April 8, 2008 | Reply

  42. hi,
    i have one more doubt. How to automate an AJAX layer?? The situation is like this. When we click on an image, a layer pop-ups.We need to validate that layer. Its visible property is always set to true. Can u tell me how to validate it??

    Comment by Saranya | April 9, 2008 | Reply

  43. Is it possible to compare two excel files at run time through QTP ?

    Comment by kishore | April 9, 2008 | Reply

  44. HI,

    Good Job, i have used your XL sheet Compare Function, thanks for the same, I am trying to search a value with in the XL sheet, and the value can be any where with in the XL sheet can you please help me, thank you in advance.

    Mahendra

    Comment by Masha | April 14, 2008 | Reply

  45. Step 1: Create an Excel sheet as 1.xls
    Step 2: Write your desired String which you want to search.
    Step 3: Use below code for searching your above written text ( I have used “Test” for searching the text). Change according your String in the code for this condition If cell.Value = “Test” Then )

    ‘*****************************************************
    ‘Name: KR Testing Solutions
    ‘Code Description: Code for search “Test” in excel sheet and highlighted with Red color
    ‘Date: 14-04-2008
    ‘Website: http://www.kuldeepse.wordpress.com
    ‘*****************************************************
    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    Set objWorkbook1= objExcel.Workbooks.Open(“D:\1.xls”)

    Set objWorksheet1= objWorkbook1.Worksheets(1)

    For Each cell In objWorksheet1.UsedRange
    If cell.Value = “Test” Then
    cell.Interior.ColorIndex = 3′Highlights in red color if any changes in cells
    MsgBox “Your Text Successfully Found”, vbOKOnly
    Else
    cell.Interior.ColorIndex = 0
    MsgBox “Failed”, vbOKOnly
    End If
    Next

    set objExcel=nothing

    Comment by KR Testing Solutions | April 14, 2008 | Reply

  46. Hi

    thats greate

    thank you for the solution you made my work easy.
    please keep doing the good job thanks again

    Masha

    Comment by Masha | April 15, 2008 | Reply

  47. Hi Mohan Kumar,

    Second time visiting this blog. Very nice advance work for QTP. To Run Multiple test, do you have any suggestion or code for AOM?
    I tried Multi-Test Manager and Built-in Batchrunner but I found they are not very useful.

    Thanks,
    Prashant

    Comment by Prashant | April 16, 2008 | Reply

  48. Hi Mohan,

    I am working on QTP and having a problem with deleting the empty rows in excel sheet. Could you please help me out here?

    Thanks,
    Chandra

    Comment by Chandra | April 16, 2008 | Reply

  49. Prashant,
    The suggesion depends on the req.
    Any how the best way to create batch runner is to create a driver script in qtp with some control mechanism.

    1.make all your actions in all tests to reusable.
    2.create a new test and insert the actions from all test in the order you wanted.

    3. create an excel sheet called control file which has all the actions (tests) with run status flag( weather to run the test or not)
    4. based on the control file flag control calling the actions
    for ex:

    if datatable(“RunStatus”,”ControlFile”)=true then
    RunAction”……..”
    end if
    datatable.setnextrow

    –mohan kumar kakarla

    Comment by quicktestprofessional | April 17, 2008 | Reply

  50. Hi Chandra,
    First tell me how you are deleting the row.
    Are u deleting by selecting the row and press delete in key board?
    If yes then that is the problem.
    The data table this design issue, even u delete the row also it has the reference to that row with empty contents.
    The solution for this is select the row and right click then select edità delete.
    Hope ur problem may solve. Let me know the status.

    Mohan kakarla

    Comment by quicktestprofessional | April 17, 2008 | Reply

  51. Hi can u giv idea about automation qtp frame work for a web application..and hw can design that
    and also can u send some sample framework ???

    Comment by Arunkumar | April 22, 2008 | Reply

  52. Arunkumar,
    It is impossible to send any sample code on framework.
    You can search the net for the same. There are so many frameworks you can develop for web app
    1. FDMA (Fucntionality Decomposition Multiple Actions)
    2. data Driven
    3. Keyword driven
    4. hybrid

    If u have good knowledge in QTP and if u r in bangalore i can guide you.

    Comment by quicktestprofessional | April 22, 2008 | Reply

  53. Hi Mohan,

    Can you share your QTP information with my blog also? So that we can make a single repository. Which can be like Google, Encyclopedia.

    Regards,
    Kuldeep Sharma
    +919910664553
    KR Testing Solutions

    Comment by KR Testing Solutions | April 24, 2008 | Reply

  54. Hi Mohan,

    I have an XML file in a cell in an excel sheet like

    I need to compare this with my Actual output which will appear in an text box in the UI.If the above GetAccUIDResponse,GetAccUIDResult exist in the below actual result then my test script is passed in QTP

    054159622053733cc2-ecc0-48e9-9e08-00f75e42c61b

    Let me know how to compare these two files .

    Comment by Kumar | April 24, 2008 | Reply

  55. Kumar ,
    Could u be brief, what exatly u want.

    Comment by quicktestprofessional | April 25, 2008 | Reply

  56. Hi Mohan,

    Have u ever encountered a bad length error message? I encountered this one while edit an SAPGuiEdit. Is there any way to solve this problems? Thanks in advance.

    Comment by Yuzz | April 28, 2008 | Reply

  57. Yuzz,
    I never worked on SAP application. But i suspect that, the edit box has restriction on length. so when the qtp trying to enter the data which has more than the accepted length of edit, it popups error.
    verify the length manually and also spy the object and look for length property.

    Comment by quicktestprofessional | April 28, 2008 | Reply

  58. Hi KK,

    I have one question.
    when am working with qtp at that time am unable to open internet explorer, its showing some warning message like..
    IE encountered a problem and needs to close.and its shows close and debug buttons.

    could you plse tell me the solution.

    Comment by Nani | April 28, 2008 | Reply

  59. Hi mohan.
    i am a newbie for QTP i have only a bit of its operational knowledge. i want to be an expert but i also dont have much of the programming knowledge. could u plz giv me some docs from which i can strt frm the scratch on the way of mastering QTP.

    Comment by Amit Kumar | April 29, 2008 | Reply

  60. Amit,
    You do not have worry about the good qtp materila, the one which come with installation (pdf documentation) is the best book for QTP. goto start–>qtp–>documentation–>printerfriendly docs here you can find tutorial and user guide with 110,1110 pages each. so start with that and read VBScript documentaion available in QTP help file. Goto discussion forums(ex:sqaforums,TDforums etc) and blogs, you can improve ur self and become an expert.
    -mohan kumar kakarla

    Comment by quicktestprofessional | April 29, 2008 | Reply

  61. Hi Mohan,
    your page gave me good inputs. Could plz give sample code to connect to QC using QTP and Run and update defects through Qtp code.
    Please regarding this.

    Comment by Manohar | May 5, 2008 | Reply

  62. Manohar ,

    I have no ready made code with me.You have to use the Quality Center Open Test Architecture to do this. The guide will give you lots of examples and code snippets.This guide can be available to down load at

    http://javachip.org/Tutorial/TD%20Tutorial.pdf

    Comment by quicktestprofessional | May 6, 2008 | Reply

  63. This site is very helpful to the QTP users.

    Comment by vidyasagar | May 6, 2008 | Reply

  64. Hi mohan,
    I’m trying to record Java based application using qtp 9.5 including the Java addin.
    when ever i’m tring to record the Java application freeze and i must kill the application.
    the Java application is Swing+SWT (Eclipse) based.
    can you assist please?
    Thanks

    Comment by Ilan bar | May 6, 2008 | Reply

  65. Hi Mohan,

    I am using QTP for testing Graphics samples which is new to me.

    I am also new to QTP.Hope u will not laugh.Bcoz when i saw the comments ..all looked like experts to me.

    I am getting this error:
    Cannot find the “Run” objects’s parent “XYZ”(class Dialog).Verify that parent properties match an object currently displayed in your application.

    note:XYZ is my application.
    But sometimes very rarely ,the test is successful when i click on checkpoint properties

    Comment by Devi | May 6, 2008 | Reply

  66. Devi,
    This may happens when u have added the object’s properties with dynamic nature.
    1.Open Object repository, select ur dialog xyz.
    2.Look for the properties and its values which has dynamic value. ex: window ID , hwnd , native class
    3. delete those propeties by clicking Add/Remove button and then deselect those properties

    Let me know the status
    mohan kakarla

    Comment by quicktestprofessional | May 7, 2008 | Reply

  67. Hi mohan,

    I tried what you said.But when i run the XYZ application,when i “run” a sample,during runtime system is waiting for me to click the run..instead of running by itself..can you help me out.

    Comment by Devi | May 7, 2008 | Reply

  68. Hi Mohan,

    First of i am very thankfull to you for the information you are providing for QTP.

    i have one query. i have a table in database and i want data fron that table to Excel sheet using vbscript to use in QTP . when export to excel sheet it should contain data and including the column heading aslo.

    Thank in advance . i aom farword for your responce.

    Comment by anji | May 9, 2008 | Reply

  69. anji,
    1)i have one query. i have a table in database and i want data fron that table to Excel sheet using vbscript to use in QTP
    A)What is the database u r working on? because if u want to do this for Access , you may find the code to export to excel in google. but if you wanted it to work for any database, you have to use normal adodc connection set and record set and iterate throw all the rows , in tha same time open excel through automation object model and and write it there.
    you can get code samples in my blog also.
    2.when export to excel sheet it should contain data and including the column heading aslo.
    A)For this you have to use objAdRs.fields(i).Name in the code where objAdRs is the user defined object instance name for the record set.

    Comment by quicktestprofessional | May 9, 2008 | Reply

  70. Need help … I am trying to encrypt password

    Set objExcel = CreateObject(“Excel.Application”)
    Set objWorkbook = objExcel.Workbooks.Open(“G:\sheet.xls” ,,True,, “Password”)

    when I use QTP password encryption tool and replace ‘password’ with what the QTP tool gives me ’23423hj341khjbk234′ I get error that password is incorrect

    where should I put SetSecure ?

    Comment by Mark | May 9, 2008 | Reply

  71. Cannot identify the object “Intel Larrabee SDK Sample” (of class Dialog). Verify that this object’s properties match an object currently displayed in your application.
    Line (7): “Dialog(“Intel Larrabee SDK Sample”).Check CheckPoint(“Intel Larrabee SDK Sample”).Check CheckPoint(“Intel Larrabee SDK Sample”)”.

    This is error message i am getting.How do i proceed.

    Comment by Devi | May 9, 2008 | Reply

  72. Devi,
    How you got check checkpoint two times in a single stmt

    -mohan kk

    Comment by quicktestprofessional | May 12, 2008 | Reply

  73. Mark,
    Yes the password is in incorrect. The tool does not have the way to decrypt the passwords , except , the setsecure method , which works only with edit boxes. Qtp does not able to decrypt by itself.
    so do not encrypt your password.

    Comment by quicktestprofessional | May 12, 2008 | Reply

  74. Thanks for your quick responce

    Comment by Mark | May 12, 2008 | Reply

  75. Hi Mohan,

    Cannot find the “Run” object’s parent “Intel Larrabee SDK Sample” (class Dialog). Verify that parent properties match an object currently displayed in your application.

    This is the message.What do i do….

    Comment by Devi | May 12, 2008 | Reply

  76. Hi Mohan,

    Is there any addin to connect QTP 8.2 to QC 9.0

    Comment by Sudhindra | May 13, 2008 | Reply

  77. Devi,
    Post here the properties and its values those are present in the OR for the dialog object.
    -Mohan kakarla

    Comment by mohan Kakarla | May 13, 2008 | Reply

  78. Hey Sudhindra,
    Yes. Addin is required to connect QC with QTP. You can find the location to download at QC home page only.
    Open ur QC and click on Addin Page link, there u will get the info requirements and the download path for the qtp adin

    Comment by quicktestprofessional | May 13, 2008 | Reply

  79. Hi Mohan,

    Properties:
    Description properties:
    text : Cloth
    nativeclass : #32770
    is owned window : False
    is child window : False
    ordinal identifier:
    type,value : None

    I tried deselecting the native class but still the same problem,but occasionally once in 10 times or..so it is successful.

    Comment by Devi | May 13, 2008 | Reply

  80. In the above properties

    text: Intel Larrabee SDK Sample Browser-Security warning.

    Comment by Devi | May 14, 2008 | Reply

  81. Devi,
    I have told u that not to use the dynamic nature properties and also mentioned not to use the nativeclass, since its value #32770 canm change time to time. Read agin the comment 70 and know how to remove that peroperty from the OR.
    Let me know the status.

    Comment by quicktestprofessional | May 14, 2008 | Reply

  82. HI I am prasad i wana some querry when we are using keyword driven then we need to use the actions is it mandatory or not

    and when we are using qtp with quality center where we are conver the test scripts and where we run in batch mode it is automatiolly opens the qc or we use qtp
    plz clarify

    thanks
    Prasad
    9880670803

    Comment by prasad | May 14, 2008 | Reply

  83. prasad,
    I think u have sarted ur qtp recently.You are confusing with keyword framework and confusing us also. There no relation between keyword and action. so how can i say it is mandetory or not.

    Regarding QC, please be brief

    Comment by quicktestprofessional | May 14, 2008 | Reply

  84. Hi Mohan,

    As i told in comment 80,even after removing the native class…still i am getting the error.Can i have your mail id..so i can send the screen shot,If you dont mind.

    Regards
    Devi

    Comment by Devi | May 14, 2008 | Reply

  85. Devi,
    Check ur mail devi_reddy75@yahoo.com
    for the details
    Mohan kakarla

    Comment by quicktestprofessional | May 15, 2008 | Reply

  86. Dear Mohan,

    I’m a newbie using QTP and I’m testing a WebSite that my development team is programming.

    I want to test the login module of the website, because it’s quite complex, and I want to check the database after I run my tests (50 iterations with different data and situations) to be sure that the database is modifying some flags (status) in the right way.

    So, I created a database checkpoint after the previous steps (whole login process), but for some reason, when I create the DB checkpoint, the QTP is taking a picture (ResultSet) of the database, and is comparing that “old” picture with the new data (test run), so, of course is displaying that my tests failed.

    It exists any way to check the database, run by run and checking the “new” data in the DB properly?.

    I would appreciate any answer that you could provide me.

    Miguel Ramirez
    Colombian working in Brazil.

    Comment by Miguel Ramirez | May 16, 2008 | Reply

  87. Mohan,

    I wanted to Automate a report.can you tell me what is the best possible way to automate a report using QTP

    Your help is really appreciated

    Sowmya.

    Comment by Sowmya | May 16, 2008 | Reply

  88. Miguel Ramirez,
    The database checkpoint is not the practical way to automate these situations. I can say DB checkpoint is of
    useless feature provided by qtp. Use ADODB connection and recordset to retrieve the contents and verify with your Test Data.Here is the sample code how to provide a connction to MSAccess Db
    Function obj_UDF_getRecordset (strFileName, strSQLStatement)

    Dim objAdCon, objAdRs

    Set objAdCon = CreateObject(“ADODB.Connection”)

    objAdCon.Open “DRIVER={Microsoft Access Driver (*.mdb)};DBQ=”&strFileName & “;Readonly=True”
    If Err 0 Then
    Reporter.ReportEvent micFail,”Create Connection”, “[Connection] Error has occured. Error : ” & Err
    Set obj_UDF_getRecordset = Nothing
    Exit Function
    End If
    Set objAdRs = CreateObject(“ADODB.Recordset”)
    objAdRs.CursorLocation=3 ‘ set the cursor to use adUseClient – disconnected recordset
    objAdRs.Open strSQLStatement, objAdCon, 1, 3

    While objAdRs.EOF=false
    For i=0 to 4
    msgbox objAdRs.fields(i)
    Next
    objAdRs.moveNext
    Wend

    If Err0 Then
    Reporter.ReportEvent micFail,”Open Recordset”, “Error has occured.Error Code : ” & Err
    Set obj_UDF_getRecordset = Nothing
    Exit Function
    End If

    Set objAdRs.ActiveConnection = Nothing

    objAdCon.Close
    Set objAdCon = Nothing

    Set obj_UDF_getRecordset = objAdRs

    End Function

    Set rsAddin = obj_UDF_getRecordset(“C:\Documents and Settings\mohank\Desktop\Login.mdb”, “Select * from Login”)

    Comment by quicktestprofessional | May 16, 2008 | Reply

  89. Sowmya,
    First of all what kind of reports they are?
    what kind of data will be dsplayed(Dynamic or static)?
    Is there any part of the report contains the data that you have choosen to report?

    based on these info try to analyse the relation between the data given by you to generate report and try to create some optimal functions and reuse them.

    Comment by quicktestprofessional | May 16, 2008 | Reply

  90. Devi,

    I have few queries , please clarify.
    1. When I see your snapshot i found 2 dialogs, one is “File Download – Security warning” which has the Run button and 2nd dialog was not visible in the snapshot to know what might be that, but it looks like “Larrabee SDK sample…”
    Now the qusetion is is the second dialog which is not visible also has the Run button?
    When i see ur error message which is clearly saying dialog “Intel Larrabee SDK sample” is not found.
    yes it is true , bcoz i have not seen any dialog with the name”Intel Larrabee SDK sampl” in the snapshot and qtp is not able to identify the dialog with the properties mentioned in the OR. It might be because of dialog name may be changed.

    So try to add the required dialog again as follows.
    1.Open OR and click on add Objects
    2. add the required dialog to the OR
    3. Check for native class and remove
    4. find out “Regexpwndtitle” property else click on add/remove button and select that property(the value must not be empty)
    5. run again

    Finally excuse for delay in resopnse.

    Comment by quicktestprofessional | May 16, 2008 | Reply

  91. Hi,
    I need to compare cell content of the excel sheet with particular pattern and ignoring the rest of the cntents.

    For example….

    Ex: file1.xls, file2.xls

    Pattern to compare in file1.xls cell (1,1): “This is the message to match” in cell of file2.xls which contains ” My contents is this is the message to match”.

    Here I need to ignore the other string and need to check whether “This is the message to match” is present in file2.xls cell.

    Like this I have around 180 rows to compare.

    The logic which I am thinking is…

    1. Read first cell of file1.xls & file2.xls
    2. Compare them and if it is matching then write “Pass” else “Fail” in second column of file2.xls
    3. Repeat the Step1 and step2 for rest of 180 rows.

    I am looking for QTP script which can perform above logic since I am new to QTP and dont know much apreicate your help on this and reply to bond_369@yahoo.com

    Comment by Jay | May 19, 2008 | Reply

  92. Jay,
    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    Set objWorkbook1= objExcel.Workbooks.Open(“\\1.xls”)
    Set objWorkbook2= objExcel.Workbooks.Open(“\\2.xls”)

    Set objWorksheet1= objWorkbook1.Worksheets(1)

    Set objWorksheet2= objWorkbook2.Worksheets(1)

    For Each cell In objWorksheet1.UsedRange

    c1=cell.Value

    c2=objWorksheet2.Range(cell.Address).Value

    Set re=New RegExp
    re.Pattern=c1
    re.IgnoreCase=True
    re.Global=True
    ‘MsgBox s
    ‘MsgBox ptn
    ‘MsgBox re.Test(s)

    If re.Test(c2)

    cell.Value=”Pass”
    Else
    cell.Value=”Fail”
    cell.Interior.ColorIndex = 3
    End If
    Next

    set objExcel=nothing

    Comment by quicktestprofessional | May 19, 2008 | Reply

  93. I need to automate an Windows Desktop application which is developed in Borland’s Delphi version 6.0.

    Which Add in I need to install for QTP 9.2 as QTP is identfying all the objects as Winobject??

    Comment by Narendra | May 20, 2008 | Reply

  94. (Sorry this is posted in two places.)

    I have some questions about the “DELETE ROWS FROM XL SHEET” code, since I am trying to use it.

    1. Where do I put the name and location of my excel file?

    Ex: “C:\Names_places.xls” ,”Data” ,”Global”

    2. Where in the above code do I tell it exactly which row in which column to delete?

    EX: I always want to delete Row 1 in the first column, Name. I will be adding this code to the end of my script.

    Thanks!

    Steve

    Comment by Steve Langille | May 20, 2008 | Reply

  95. My alternate email is; slang46188@aol.com

    Thanks again!

    Comment by Steve Langille | May 20, 2008 | Reply

  96. Steve,
    The code given in the post is to delete either rows or columns but not row in a column. so the code will not

    serve ur req. when u see logically ur requirement, there is no point in deleting a row in a column. bcoz

    deleteing a row in a column is nothing but making it empty. right! so use normal code that clears data in a cell
    Function ClearCell (Path,Sheetname,rNum, cNum)
    Set oExcel = CreateObject(“Excel.Application”)
    ‘Sets the application to raise no app alerts
    ‘In this case it will allow a file overwrite w/o raising a ‘yes/no’ dialog
    oExcel.DisplayAlerts = False

    ‘Open Book in Excel
    Set oBook = oExcel.Workbooks.Open(Path)
    Set oSheet = oBook.Worksheets(“Sheetname”)

    oSheet.cells(rNum ,cNum).value=””

    ‘Save new book to Excel file
    oBook.Save

    ‘Close the xls file
    oExcel.Workbooks.Close()

    End Function

    call ClearCell(“C:\Names_places.xls” ,”Global”,1,1)

    Comment by quicktestprofessional | May 21, 2008 | Reply

  97. can u tell me how to get the number of lines in a document in qtp?

    Comment by kriti | May 21, 2008 | Reply

  98. can you explain by qtp script:

    i) how to compare the string of two different notepad, suppose i know the starting and ending of string,

    ii)how i can fetch the different of string from two different file and create a new file and paste and save, close it..
    regards
    Mthu

    Comment by Muthu | May 21, 2008 | Reply

  99. Hi Mohan,
    I have problem with Autocomplete part of the form in web page, while running the QTP to test the peage it can’t recognize the Ajax Autocomplete texbox, is there any solution?

    Country: ( is a drop down box)
    City:(Ajax autocomplete textbox)
    University:( it depend on which city you’ve choosed)

    evry time while running QTF while it go through the following line (*****)it showed Run Error:

    Browser(“Page 100 – ScreeningWizard”).Page(“Page 100 – ScreeningWizard_3″).WebList(“ctl00$ContentPlaceHolder1$Pers”).Select “Sweden”
    ***** Browser(“Page 100 – ScreeningWizard”).Page(“Page 100 – ScreeningWizard_3″).WebEdit(“ctl00$ContentPlaceHolder1$Pers”).Set “Stockholm”
    Browser(“Nova 100 – ScreeningWizard”).Page(“Page 100 – ScreeningWizard_3″).WebList(“ctl00$ContentPlaceHolder1$Pers_2″).Select “Kungliga tekniska högskolan”

    ERROR: Cannot identify the specified item of the ctl00$ContentPlaceHolder1$Pers_2 object. Confirm that the specified item is included in the object’s item collection.

    I’ll be appreciate if you could help me !

    Comment by Sherry | May 26, 2008 | Reply

  100. Hi

    I have one Doubt in qtp regarding database validating in QTP.
    1. I have created one database ex:emp.db i want to validate the .db file by using QTP. is it possible validate the .db file means ( i want to find how many rows and columns are thr and i need to validate that each and every name and emp id in that file) plz give me the solution for this

    Comment by suseela | May 27, 2008 | Reply

  101. sir,
    I need to install qtp 9.2, please guide me

    Comment by sunil | May 27, 2008 | Reply

  102. Sunil,

    It is as easy as installing any other s/w. try to install and let me know if any issues u will get.
    1. earlier versons should be removed
    2. use 0000-0000000000 (4 zeros- 10 zeros) for evolutiotion purpouse

    Comment by quicktestprofessional | May 27, 2008 | Reply

  103. Hi Mohan,

    I saw your blog today and its really very helpful to lot of people like me who are very new to QTP.

    I am facing some issues with my scipt. Detail is here:

    We are in a page. Clicked on a link. another page opens. Selected a value from a list in the new page. Once we select any value from the new page it closes and we come back to the previous page.

    and now QTP Object spy could not recognise any object on this page so obviously could not click on any of the object on that page.

    If we manually click on some link and go to some other page and come back to this page again QTP object spy could recognise the objects.

    Please give me some direction on how to approach this in QTP script.

    Thanks,
    Nivedita

    Comment by Nivedita | June 2, 2008 | Reply

  104. Hi Mohan,

    Thanks for the support that u r providing through this blog.

    I am stuck in the middle of QTP scripting can u pls help me out.

    I need to click on the print icon in an window page.QTP is identying the object as an Winobject.
    The actual path QTP is identfying is Browser(….).Activex(…..).Winobject(…).

    Please do respond at the earliest.Thanks For the support

    Comment by Narendra | June 2, 2008 | Reply

  105. Narendra,

    The window may be a java or a dotnet window, and u may be not having the addins for that, so it is not recognizing.
    so try to find the type of window and select those addins and try else see the concept of “UserDefined” in object identification in help , it may solve ur problem

    Comment by quicktestprofessional | June 2, 2008 | Reply

  106. Please answer to my query.

    Comment by Nivedita | June 3, 2008 | Reply

  107. Hi!

    using QTP we can make a connection to DB , the resulted recordset contains all the headers and info under them. My problem is how to write this recordset data into a external excel file?

    As we know the same can be done easily in winrunner TSL.

    It will be thankful if any suggestions are there

    –shaan

    Comment by sugumar | June 3, 2008 | Reply

  108. Hi Mohan,
    I am trying to connect to QC from QTP. I could connect successfully. Suppose if i have a script in QTP say 123.
    And i have a test case in QC say TC1. How do i link Script with Test case?

    Thanks
    Uday

    Comment by Uday Bhaskar | June 5, 2008 | Reply

  109. Uday Bhaskar,

    If u r talking about linking manual TC in QC with Test Script in QTP then You can not link like this way.
    Open your manual TC in test plan and click on design steps, under the design steps you can find out a thumbnail (image) called generate script. select qtp in that option. so that it will convert the manual TC to sample qtp script(a template kind of qtp script) say “qc test1″. Now you have the script in QC.
    Open the test “qtp12″that was created in qtp and saveAs the test to the one in QC

    Comment by quicktestprofessional | June 5, 2008 | Reply

  110. hi!,
    how to establish connection with excel file using QTP.

    Comment by vineetkandpal | June 18, 2008 | Reply

  111. Hi!,
    How we can fetch data from excel sheet using QTP.

    Comment by Vineet Kandpal | June 18, 2008 | Reply

  112. Good Work Mohan . All the best. It helps every user a lot ..You have significantly arrange all the topics in a very dynamic fashion..

    Regards,
    Faisal

    Comment by Faisal | June 19, 2008 | Reply

  113. hi my problem is i have thousands statements while execution i got one window in the middile of execution i put one in that if window is exist then goto the first statement for execution is it posible ? i want the solution for this.if posible tell me please…..

    Comment by Chandu | June 19, 2008 | Reply

  114. Chandu,
    Vbscript does not support GoTo stement directly , u have to use with “On Error GoTo” stmt only.
    There are 2 ways to achieve this

    Cosider u have 4 stmts, after 2 stmt u are getting the window , so u have start again from step 1.

    Way 1: Make first 2 stmts into a function and call that accordingly

    Function abc()
    stmt 1
    stmt 2
    End Function
    Call abc()
    if window().exist then
    Call abc()
    End If
    stmt 3
    stmt 4

    Way 2:
    var_Window=True

    while var_Window=true
    stmt 1
    stmt 2

    if window().exist then
    var_Window=True
    else
    var_Window=False
    End If

    Wend

    stmt 3
    stmt 4

    Hope i explained it clear

    Comment by quicktestprofessional | June 19, 2008 | Reply

  115. Mohan,

    U r doing excellent job. I have seen the articles u posted and the replies u r giving to needful. I thought to appreciate u r efforts in giving solutions.

    Keep up the good work.

    Thanks
    Sai.

    Comment by SK | June 23, 2008 | Reply

  116. Hi Mohan,

    Can u pls send me the code to connect to QC and run the test script from QC.

    Thank You

    Narendra

    Comment by Narendra | July 3, 2008 | Reply

  117. hi,
    i have one question in datatable.i get the columname from datatable.if the column name contains “1″(Ex:name1)ihave to replace “1″ as “(1)”(ex:name(1)).is it possible?can u help me on that?

    Comment by mohee | July 3, 2008 | Reply

  118. mohee,
    It can do it in different ways
    1. export data table to excel and use excel automation to modify the contents

    2.use datatable and loop through its contents for each change export it excel and again import to data table

    Comment by quicktestprofessional | July 4, 2008 | Reply

  119. Hi Mohan

    I need to know how to Save the already created MS word file using QTP. If you have any idea, please provide me a QTP code for this

    Thanks & Regards
    Amila

    Comment by Amila Dharmaratne | July 4, 2008 | Reply

  120. Hi

    Sorry for the disturbing. I need this as soon as possible.

    Thanks
    Amila

    Comment by Amila Dharmaratne | July 4, 2008 | Reply

  121. Set wrdApp = CreateObject(“Word.Application”)
    Amila ,
    If you just want to open and save or save as use the following code
    Set wrdDoc = wrdApp.Documents.Open(“C:\Documents and Settings\mohan.kakarla\Desktop\1.doc”)
    wrdDoc.save
    wrdDoc.saveAs(“C:\Documents and Settings\mohan.kakarla\Desktop\3.doc”)
    wrdDoc.close
    Set wrdDoc = Nothing
    Set wrdApp = Nothing

    Comment by quicktestprofessional | July 4, 2008 | Reply

  122. Hi

    The functions that you have used are fine. I am happy to look and use them but I want to know about all the functions for a particular object.

    for example in the following code snippet:-
    Set wrdDoc = wrdApp.Documents.Open(”C:\Documents and Settings\mohan.kakarla\Desktop\1.doc”
    wrdDoc.save
    wrdDoc.saveAs(”C:\Documents and Settings\mohan.kakarla\Desktop\3.doc”
    wrdDoc.close
    Set wrdDoc = Nothing
    Set wrdApp = Nothing

    What are all the methods that are supported apart from save, saveas,open, close.

    Please do the needfull in this regard.

    Thanks
    Srinivas P

    Comment by srinivas potti | July 8, 2008 | Reply

  123. srinivas,
    Thanks for the suggession , but why shiuld i reinvent the wheel. all the methods and properties can be available in help file of the micosoft word. open word click on the tab help. thre u can find Microsoft word visual basic reference, there u can find all the methods u are looking for.

    Comment by quicktestprofessional | July 8, 2008 | Reply

  124. Hi Mohan,

    First time I am visiting your page its really great, Good job… :)

    I was stuck in a problem with OTA API Quality center 9.2. I have created a vbs file which I scheduled in my test lab machine, this vbs file run the couple of test suites in Quality center daily and finally generates a .xls report with the execution time, date, status and test case names.

    After generating the report I have to send the report to the responsible persons.

    I have created vbs script which is supposed to attaché the attachment in Quality center and send the mail attachment to the recipients, every thing is working fine but attachment is not coming..

    For time being I am using the another script which is sending the mail attachment through Lotus, but in this case I have to open my lotus notes every time then only it will work

    In OTA reference mentioned that we can send the Attachment lists in Quality center as a variant array.

    We are using Quality Center 9.2 and QTP 9.0.

    I have posted this issue in lots of forums but I haven’t get any solution hope you can solve my problem. Please find the below code which I used.

    Dim QCConnection
    Dim attachFact
    Dim theAttachment
    Dim attachList
    Dim AttachmentList()
    Dim HasAttachs
    Set QCConnection = CreateObject(“TDApiOle80.TDConnection”)
    QCConnection.InitConnectionEx “http://test/qcbin”
    QCConnection.login “uid”, “psw”
    QCConnection.Connect “domine”, “project”
    Set TSetFact = QCConnection.TestSetFactory
    Set tsTreeMgr = QCConnection.TestSetTreeManager
    nPath = “Root\testfolder”
    Set tsFolder = tsTreeMgr.NodeByPath(nPath)
    Set attachFact = tsFolder.Attachments
    Set attachList = attachFact.NewList(“”)
    For Each theAttachment In attachList
    msgbox theAttachment.FileName
    Next
    If Not HasAttachs Then
    Set theAttachment = attachFact.AddItem(Null)
    theAttachment.FileName = “C:\temp\Report.xls”
    TDATT_FILE = 1
    theAttachment.Type = TDATT_FILE
    theAttachment.Post
    End If
    ReDim Preserve AttachmentList(attachList.Count – 1)
    Dim i
    i = LBound(AttachmentList)
    For Each theAttachment In attachList
    AttachmentList(i) = theAttachment.ServerFileName
    i = i + 1
    Next
    Dim fName
    For Each fName In AttachmentList
    msgbox “The AttachmentList element is ” & fName
    Next
    QCConnection.SendMail “sarat…@gmail.com”,””,”Test”,”Hello”,
    AttachmentList
    msgbox “bye”
    QCConnection.Disconnect
    QCConnection.Logout
    Set QCConnection = Nothing

    Thnaks,

    Sarath

    Comment by sarath nalla | July 8, 2008 | Reply

    • Hi Sarat, ur code was excellent, similar problem for me, i need your suggestion,
      we been using a keyword driven framework in .xls file, and a function file .txt which these two files being called by qtp at runtime, now my question is, we are integrating qtp with qc, so, do we need to attach .xls file and .txt file to QC or we can leave as it is?
      pls help me, if we attach those files to QC, can we remove those two files from my local disk? if so, how can i establish connection for those two files with QTP through QC?
      it will be very helpful if u provide some code or detail steps.
      Thanks in Advance.

      Comment by Aravind | August 10, 2011 | Reply

  125. hi mohan,

    i am new to testing .actually i don’t understand how to set the shared object repository mode.pleasetell me the navigational statements for shared OR in qtp 9.2.i didn’t see any options to select per action , shared OR.
    SEND ANSWER TO MY MAIL.

    Thanks,
    shilpa
    shilpa_koukuntla@yahoo.co.in

    Comment by shilpa | July 9, 2008 | Reply

  126. shilpa,

    There will be no option to swich between shared and per action OR in qtp 9.2 . OR was drastically changed in 9.2
    Read the help document , u will gwt better picture

    Comment by quicktestprofessional | July 9, 2008 | Reply

  127. Hi, Mohan

    Do we have an option to Read the Data From PDF Format?If So can you please help me out with the same

    Regards
    Mahendra

    Comment by Mahendra | July 10, 2008 | Reply

  128. Hi, Mohan

    I must appreciate your effort, i need your help in connecting Test director with the QTP. Can u give me such material or anything that can be helpful in doing that on my mail.

    Thanks

    Sanjay Dabhi

    Comment by Sanjay | July 11, 2008 | Reply

  129. Sanjay,
    You need to exploree the Test Director Open Test Architecture (TD-OTA) to do this . you can download it from the link http://javachip.org/Tutorial/TD%20Tutorial.pdf

    Regards,
    Mohan Kakarla

    Comment by quicktestprofessional | July 11, 2008 | Reply

  130. how to connect to sql server from qtp and work on it

    Comment by raja | July 12, 2008 | Reply

  131. Hi Mohan

    I came across about your site today and its fantastic.

    Thanks for sharing your experience and knowledge

    Comment by Muralidhar Vadakattu | July 12, 2008 | Reply

  132. raja,
    The code that given for connecting access database is also works for any database. only thing u have to modify is the connection string. so change the connection string to respected database goven in the folloing websitr.
    http://www.connectionstrings.com

    Mohan kakarla

    Comment by quicktestprofessional | July 13, 2008 | Reply

  133. Hi Mohan,

    I need to Save As already opened Word file. I do not need open Word file using QTP script. Mean, currently its open. I need to save this file to new location with new name.

    For example:
    Steps
    1. Manually Open word file
    2. Enter some lines to that file by hand
    3. Save this file to specific folder(C:\Test1\Test1.doc) using QTP script. (No need to open word file using QTP)

    I use this code

    Set l_objWD = GetObject( ,”Word.Application”)
    l_objWD.ActiveDocument.SaveAs “C:\test1\test1.doc”
    l_objWD.Quit

    This is give syntax error, but its work.

    If there any way to save already opened Word file other than this, without given any syntax error?

    Please help me to fined this.

    Thanks
    Amila

    Comment by Amila Dharmaratne | July 14, 2008 | Reply

  134. hi mohan,
    i want to take value in the middle of datatable.is it posible?(we have value in 10 rows but i want 5th row value only and i want to execute from 5th row)is there any ways to follow like this?

    cheers
    chandu.

    Comment by chandu | July 14, 2008 | Reply

  135. Hello Mohan,

    We have recently started to use QuickTest Professional 9.0 to streamline our translation testing. I am having a bit of trouble figuring out how to compare a text property of an object with an external one (via Excel or XML). What I want to do is make sure that the entire translated string is being displayed and not cut off. We currently keep all our translated strings within Excel files with two columns; first one with the object name and second with the string.

    Is there anyway I could create a test that would check the text that is visible on the program against what it should be in the Excel file? If you could e-mail me back on this it would greatly appreciated. Thanks,

    Mike

    Comment by Mike | July 14, 2008 | Reply

  136. Hello Mohan,

    I am working on automating a web based application. A table in the webpage is identified as image. There is a button in one column of each row clicking which displays the details on that row. All objects like Buttons are identified as imagebuttons and a click operation on that is identified are click of window co-ordinates. For example:

    Browser(“Home Insurance”).Page(“Home Insurance”).Image(“Select”).Click 51,6

    Due to this parameterising values becomes problematic.Is there is any way we can identify the right object.

    I tried Virtual object method as well. But i am not able to do it successfully and it gives the following error: “failed to create virtual object definition”

    Could you please suggest a solution?

    Comment by Venkat | July 15, 2008 | Reply

  137. Venkat,
    If the web table is recognizing properly , then you can use the child object method to retrive the image in a perticular cell and click on that

    Comment by quicktestprofessional | July 16, 2008 | Reply

  138. Rich,
    Even when you do it manually also the QC will not overwrite the existing file , it is the feature itself. instead you can always delete the file and then attach the updated one.you can find the code to delete in this blog itself.

    Comment by quicktestprofessional | October 17, 2008 | Reply

  139. Thirupathi,
    Regarding pdf automation , you can not dirctly interact with it from QTP. u need to use AOM model, u can find the more info at
    http://www.advancedqtp.com/wp-content/uploads/ScriptingQTP/CH16%20-%20Accessing%20PDF.pdf

    Comment by quicktestprofessional | October 17, 2008 | Reply

  140. Lavanya ,
    Regarding placing the checkpoint in a seperate VBs file and they are not working, one of the reasons may be you are using the peraction OR and while the checkpoint executes, it will cosider the current action’s OR whom it is getting called and that action does not have the required definintions of the checkpoint in the OR.

    Comment by quicktestprofessional | October 17, 2008 | Reply

  141. I need to provide an estimate to the client for a new project.Can you please let me know Whether QTP supports for the following browsers and what are the versions that QTP supports for the below browsers.

    1)Firefox
    2)IE
    3)Mozilla
    4)MsnTV
    5)Netscape
    6)Opera
    7)Safari

    Will QTP identify the objects developed in Macintosh,Vista and Unix.

    Please let me know ASAP.

    Comment by Narendra | October 17, 2008 | Reply

  142. Hi Mohan,
    Can you please provide me more details on DotNetFactory? Not examples, some therotical documents or any good website which can throw more light on DotNetFactory…
    Your all articles of QTP are good. I’m the regular visitor of your site.

    Comment by uma | October 18, 2008 | Reply

  143. uma,
    There are no documents available for the DotnetFactory in the internet so far. If u find find anything please provide the URL here. As per the dotnet factory, this blog is the only source which had comprehancive examples.

    Comment by quicktestprofessional | October 20, 2008 | Reply

  144. Hi Mohan Kumar,
    I am going through your blog from quite some time and it has been a knowledge repository for me when it comes to QTP. thanks a lot

    Can you please help me in solving the below issue. I am struggling with this from quite a long time.It will be a great help, if you can give me some solution.

    ‘My aim is to rename the file using DOS in QTP.
    DIM oShell,oFolder,lres,lTimeStamp
    oFolder = “C:XYZ”
    lres =”RES.txt”
    lTimeStamp = “RESULT!.txt”

    Set oShell = CreateObject (“WSCript.shell”)
    oShell.run “cmd /K CD & oFolder /K”
    oShell.run “ren & lres & lTimeStamp”

    Comment by Naga Praveen | October 20, 2008 | Reply

  145. Mohan, a small correction for the above query.

    oFolder = “C:\XYZ”

    I have tried to run the above program but only the first command is getting executed.

    Comment by Naga Praveen | October 20, 2008 | Reply

  146. Hi Mohan,
    Can you please provide me the script for counting the number of WedEdit’s in one webpage,and also to capture the names of webedits.

    Thanks in advance

    Comment by kalyani | October 21, 2008 | Reply

  147. Naga Praveen,

    First of all y u r going for DOS when we have FSO object model, any how its ur requirement

    I have seen ur code it has lots of mistakes
    1)You r not making the command proper i.e u r using double cotes(“) when using variables EX: “cmd /K CD & oFolder /K”
    2) The shell object each and evry time it is running , it will opens a new command prompt and trys top executs, so do not use two oShell.run stmts , combine them into one

    Here is the working code

    DIM oShell,oFolder,lres,lTimeStamp
    oFolder = “C:\Program Files\Mercury Interactive\QuickTest Professional”
    lres =”LinkCls.vbs”
    lTimeStamp = “Link.txt”

    Set oShell = CreateObject (“WSCript.shell”)
    oShell.run “cmd /K CD ” & oFolder &”& ren “& lres &” “& lTimeStamp

    Plz let me know if it serves ur problem

    Comment by quicktestprofessional | October 21, 2008 | Reply

  148. kalyani,
    Please search the blog before u comment,the post related to getting child objects already there, u can find it here

    http://quicktestprofessional.wordpress.com/category/descriptive-programming-and-child-objetcs/

    Comment by quicktestprofessional | October 21, 2008 | Reply

  149. Hi Mohan,

    Can you help me in creating a sample script to search for a value in excel.

    Thanks In Advance,
    Bhagawati

    Comment by Manu | October 21, 2008 | Reply

  150. Bhagawati,
    Just done that , u can find it in below URL
    http://quicktestprofessional.wordpress.com/2008/10/21/search-for-a-particular-value-in-excel-using-find-in-view-menu/

    Comment by quicktestprofessional | October 21, 2008 | Reply

  151. Thankyou verymuch Mohan

    Comment by Manu | October 21, 2008 | Reply

  152. Hi Mohan,
    I installed QTP 9.5 in my system Successfully.when open QTP9.5. it is showing default action as Reusable Action.But in QTP 9.1 by default action as Action.I recorded some script for my product using QTP 9.5 and run that script, it’s throws General Run Error.
    Please clarify this and comments are invited as soon as possible.

    Thanks & Regards
    Naresh A

    Comment by Naresh | November 25, 2008 | Reply

  153. Hi Mohan,

    How to intercahge and save the XML Element in the XML file using QTP
    For example xml file like this

    i need like below using QTP script(VB Script)

    Please clarify this.
    Thanks,
    Naresh A

    Comment by Naresh | November 25, 2008 | Reply

  154. Hi Mohan,
    In my application I have the date in the following format “07MAR2008″. When I tried to write date add function QTP is reading it as a string. How to convert it into date format and do adddate function and again convert back into the same format and update into the application. Is it possible. Please help me. I am using 9.2 version of QTP
    Thanks
    Sowmini

    Comment by Sowmini Devi | November 27, 2008 | Reply

  155. Hi

    I just was going through your resume for some opening.I saw the link and opened it just to kill time.Being an IT recruiter i have gone through n number of resumes.But this one thing of yours is seriously the differentiator.

    It is a good attempt of out of box thinking.your help to others is sincerely appreciated

    Thanuja

    Comment by R Thanuja | November 28, 2008 | Reply

  156. Sowmini Devi,
    Following is the code that will convert string date into required date and add a value to date and converts back to the string date

    strDate=”07MAR2008″
    strDate= replace(replace(strDate,Right(strDate,4),”/”&Right(strDate,4)),left(strDate,2),left(strDate,2)&”/”)
    strDate=dateadd(“d”,1,strDate)
    msgbox strDate
    msgbox day(strDate)&MonthName( Month(strDate),true)&year(strDate)

    please let me know if any short method is avialable.

    Comment by quicktestprofessional | November 28, 2008 | Reply

  157. Thanks Mohan,
    Its working, amazing, I asked somany people and nobody guided me properly, actually I am struggling with this issue from more than a month and atlast I got it through you. I appreciate to for helping all of us.
    Thanks
    Sowmini

    Comment by Sowmini Devi | November 28, 2008 | Reply

  158. Hi Mohan,
    One more doubt please don’t mind.
    I have a web table where I search for a client with Last name and the table display the names in a webtable with first name, last name and also client_ID. In all those only Client_ID is unique. I need to check the checkbox with the client_ID for which I am using the following code. But it is taking a lot of time to check for the client_ID. Is there any other way I can code to get the desired client with client_ID.

    Dim LineNumber
    LineNumber = Browser(“INGENIUM”).Page(“INGENIUM_17″).Frame(“Frame”).WebTable(“Select”).GetRowWithCellText(DataTable(“Client_ID”, dtGlobalSheet),3, 0)
    LineNumber = LineNumber – 1
    Browser(“INGENIUM”).Page(“INGENIUM_17″).Frame(“Frame”).WebCheckBox(“SELECT-T[" & LineNumber & "]“).Set “ON”

    Thanks
    Sowmini

    Comment by Sowmini | November 28, 2008 | Reply

  159. Hi Mohan,

    Your are doing a greate job by helping others.
    Thanks

    I need to help to compare two different excel sheets (source and destination) and store the difference information in a third excel sheet.

    Your help is highly appreciated.

    Thanks
    Prasad

    Comment by Prasad | December 1, 2008 | Reply

  160. Prasad,
    Use the following code to comapre two excels and write the difference in third one.

    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    Set objWorkbook1= objExcel.Workbooks.Open(“C:\Documents and Settings\kmohankumar\Desktop\1.xls”)
    Set objWorkbook2= objExcel.Workbooks.Open(“C:\Documents and Settings\kmohankumar\Desktop\2.xls”)
    set newWorkbook=objExcel.Workbooks.Add
    Set objWorksheet1= objWorkbook1.Worksheets(1)

    Set objWorksheet2= objWorkbook2.Worksheets(1)
    Set objNewWorksheet= newWorkbook.Worksheets(1)

    For Each cell In objWorksheet1.UsedRange
    If cell.Value objWorksheet2.Range(cell.Address).Value Then
    objNewWorksheet.Range(cell.Address).Value=cell.Value
    objNewWorksheet.Range(cell.Address).Interior.ColorIndex = 3′Highlights in red color if any changes in cells
    End If
    Next

    set objExcel=nothing

    Comment by quicktestprofessional | December 4, 2008 | Reply

  161. Hi Mohan,

    How are you? I am trying to validate PDF content with QTP 9.1 without any Add-In. Could you please give some idea how to validate PDF contents and if any logo present in a pdf file.

    Thanks in Advance…

    Kamal

    Comment by Kamal | December 4, 2008 | Reply

  162. Hi Mohan,

    While running test batch runner, I am getting only last test results. If I want to get all the tests results what would i do?

    Comment by ganesh | December 6, 2008 | Reply

  163. hi friend,
    i am doing a project(of bank dealing in reports) in that i want to define a property to the qtp9.5 but it’s a dropdown. i mean in that dropdown in that there are four option i want to hit one option from that dropdown. and secdonly i want to see whether the data brought in from database to the report is correct in this case can you please help me out…. waiting for your answer and it would be very kind of you if you can mail the answer to my mail id…… thank you very much ….

    Comment by shkhar | December 6, 2008 | Reply

  164. Hi Mohan,

    How are u.
    Can you please help me to change color of text excel sheet using QTP.

    Can you please send your email id.

    Thanks
    ggchowdari

    Comment by G. G. Chowdari | December 7, 2008 | Reply

  165. G. G. Chowdari,

    “please help me to change color of text excel sheet using QTP” do you mean to change the color of the text in cells of excel sheet.if yes here is the code.

    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    set newWorkbook=objExcel.Workbooks.Add
    Set objNewWorksheet= newWorkbook.Worksheets(1)
    objNewWorksheet.Range(“A1:A3″).Interior.ColorIndex = 3′ To select multiple cells
    ‘(or)
    objNewWorksheet.Cells(1,2).Interior.ColorIndex = 3′To select single cell
    set objExcel=nothing

    Comment by quicktestprofessional | December 8, 2008 | Reply

  166. ganesh,
    Batch runner always gives u the results based on the settings in result location window. open any test click on run, a window will appear, select new results option . run it once. then run the batch runner.

    Comment by quicktestprofessional | December 8, 2008 | Reply

  167. Hi mohan,

    I didn’t get u. please can u explain once

    Comment by ganesh | December 8, 2008 | Reply

  168. Hi,

    Pls send me the script, to validate the email id in qtp 9.1

    Thanks

    Comment by Suresh | December 8, 2008 | Reply

  169. Hi Mohan,

    Myself again Narendra here ….
    Please clarify a issue which is bugging me up all over the day.
    I have a Master script in which there are multiple Reusable Actions.
    My requirement here is I need to call the test settings(.vbs),Object Repository(OR.tsr)during runtime without adding the settings in File –> Settings–>Resources

    I have used the below script.But after the execution of this Function(QCTestSettings) the execution is coming to the First line and throwing an “Invalid procedure call or argument”.Can u pls clarify this issue?

    Dim App
    Set App = CreateObject(“QuickTest.Application”) ‘ Create the Application object
    App.Launch ‘ Start QuickTest
    App.Visible = True ‘ Make the QuickTest application visible
    ‘ Make changes in a test on Quality Center with version control
    If App.TDConnection.IsConnected Then ‘ If connection is successful
    Call QCTestSettings()
    Else
    Call SharedRepSettings()
    End If

    Function QCTestSettings()
    Set App = CreateObject(“QuickTest.Application”)
    App.Launch
    App.Visible = True
    App.Folders.RemoveAll
    App.Folders.Add””)
    QC_ORpath=”Path in QC”
    RepositoriesCollection.RemoveAll()
    RepositoriesCollection.Add(QC_ORpath)
    call ExecuteFile (“Registration.vbs”)
    call ExecuteFile (“Generic_Functions.vbs”)
    call ExecuteFile (“Resuable Functions.vbs”)
    End Function

    Comment by Narendra | December 10, 2008 | Reply

  170. Hi Mohan,
    how to export run time data table values (from multiple scripts) into one excel sheet and store it in Quality Centre? Is it possible?
    Sowmini

    Comment by Sowmini | December 11, 2008 | Reply

  171. Hi Mohan Kumar, Good day to you.

    I am trying to find out ways that QTP can help our application testing in terms of automation.

    HP provides various options of QTP evaluation licenses & I am not sure which would require for us.
    Just to brief about our application, it is web based supported by Peoplesoft & ORACLE DB.

    Could you please advise which evaluation software(s)to be used for our type of testing that involves mainly regression testing.

    1) HP QuickTest Professional 9.5 Evaluation
    2) HP QuickTest Professional for Java 9.1 Evaluation
    3) HP QuickTest Professional for .Net 9.2 Evaluation
    4) HP QuickTest Professional for Oracle 8.2 Evaluation 5) HP QuickTest Professional for Peoplesoft 8.2 Evaluation
    6) HP QuickTest Professional for VisualAge 8.2 Evaluation 7) HP QuickTest Professional Web Services Add-in 9.2 Evaluation

    As I am new to Test Automation, could you please help?

    Thanks
    Best Regards
    Karthik

    Comment by Karthik | December 11, 2008 | Reply

  172. Karthik,
    For the pople soft web application , u need to use HP QuickTest Professional for Peoplesoft 8.2 and not required to use any other addins.

    Comment by quicktestprofessional | December 11, 2008 | Reply

  173. Narendra,
    In the u are using call ExecuteFile (”Registration.vbs”), which may gives the problem in the following situations

    If u are not adding the relative path here in App.Folders.Add(“path”), it will give the error “Invalid procedure call or argument”

    so, please provide the relative path in the App.Folders.Add
    (or)
    use the full path in the ExecuteFile (”C:\QTP\Registration.vbs”).

    Let me know if ur problem got solved

    Comment by quicktestprofessional | December 11, 2008 | Reply

  174. Thanks Mohan Kumar for information.

    Have a nice day.

    Best Regards
    Karthik

    Comment by Karthik | December 12, 2008 | Reply

  175. hmm good post…I have read this somewhere,But this is more informative.

    Comment by ruchi | March 6, 2009 | Reply

  176. Hi,
    I need your help. I need the link to download
    QuickTest Professional Web Services Add-in 9.1
    Could you please mail it to me?
    Thanks & Regards,
    Ruhi

    Comment by Ruhi | March 9, 2009 | Reply

  177. Hi Mohan,
    I need ur help.
    I am trying to export two queries output from databse to an excel using QTP.
    After exporting my QTP global sheet is still showing the database output in the datatable of QTP.
    How to get my original Global sheet where I populate database names and passwords in order to execute some more queries and export the db output to excels?

    Thanks in Advance,
    Sushmitha

    Comment by Sushmitha | March 11, 2009 | Reply

  178. Hi all,
    how to check tab order from top to bottom and bottom to top in dialog box (windows applicaion)pls let me know the answer Immediately ?that dialog box have edit boxes,winlistviwer and buttons.?

    Comment by Chandu | March 11, 2009 | Reply

  179. Hi,
    I am QTP learner. I want to write script for gmail login and user open one of the mail from inbox and sign out.Every time my script going to fail. i use Descriptive prog and Reguler Expression. So how should I solve this problem.

    Waiting for ur reply.

    This my script
    browser(“name:=Gmail: Email from Google”).Page(“title:=Gmail: Email from Google”).WebEdit(“name:=Email”).Set(“akash.juventus”)
    browser(“name:=Gmail: Email from Google”).Page(“title:=Gmail: Email from Google”).WebEdit(“name:=Passwd”).Set(“sbs_2003″)
    browser(“name:=Gmail: Email from Google”).Page(“title:=Gmail: Email from Google”).WebButton(“name:=Sign in”).Click

    browser(“name:=Gmail – Inbox (4) – akash.juventus@gmail.com“,”title:=Gmail”).Page(“title:=Gmail – Inbox (4) – akash.juventus@gmail.com“).WebElement(“innertext:=rahul (6)”,”innerhtml:=rahul”).Click

    Comment by akash | March 12, 2009 | Reply

  180. I am reading your blog posts for a long time and this is my first comment at your blog because i like the post :) Please keep it up.

    Comment by Denenmis Tarifler | March 12, 2009 | Reply

  181. Hi,
    Issue : I have a excel sheet with a column name ScanDate with data type general.. how can i convert the column data to a Datetime format(dd/mm/yy hh.mm.ss AM/PM.) using VBScript
    I will be really greatful..Plz help me

    Comment by Nihar | March 20, 2009 | Reply

  182. Hi Mohan,

    How can i check with QTP/VBScript whether an img tag got an alt attribute or not?

    Thanks in advance,

    Matthew.

    Comment by Mathew | March 22, 2009 | Reply

  183. Hi,

    I want to run my QTP scripts in different remote machine without installed QTP in that machine.

    Note: but i should not call my local machine’s QTP for this script execution.

    Do you have any idea?

    Comment by Anitha | March 24, 2009 | Reply

  184. I want to say that i agree with the original posters comments.Ca someone else make a better point?

    Comment by clyde bendagraph | March 25, 2009 | Reply

  185. Hi Mohan,
    Great Job!

    Truly your site is highly informative and your work is appreciating. Thanks for knowledge sharing.

    I need your help.

    I am not able to connect QTP with “MySql” database.
    Can you please publish a sample code or send me a sample code on my mail id?

    thanks in advance

    Comment by Dharmendra | March 25, 2009 | Reply

  186. Very nice information. Thanks for this.

    Comment by ben cotten | March 25, 2009 | Reply

  187. Well, iam foreing, iam not very good writing in english, i just wanted to say thanks for this !

    Comment by Michael Inmuebles | March 27, 2009 | Reply

  188. Nicely said, I enjoy the time that it took to research and write. Great work.

    Comment by Government Loan Modification Program | March 28, 2009 | Reply

  189. Hi, I want to run my local system scripts from other machine without installed QTP. Note: without disturbing the local system.

    Comment by Anitha | March 30, 2009 | Reply

  190. Hi Kakarla,
    How are you?
    I am automating an application with QTP 10.0 version.

    My question:
    There is a label(items 1-10 of x visible).
    a link (Next>(11-y)) appears, if the x>10.

    How should i give the condition from label.

    Please respond.
    Thank you.

    Comment by Mohan | April 2, 2009 | Reply

  191. I have the same problem does any one has found solution?

    QTP v9.5.0.0 Build 194
    Add-Ins: ActiveX, Java, Oracle, Visual Basic, Web, .NET, WPF
    OS: Microsoft Windows XP Service Pack 3 (Build 2600)
    Application Java Version: Java 1.6.0_05 with Swing

    QTP is not able to recognize/record the objects for the application designed in 1.6.0_05 with Swing. We tried all the following things:

    1) We tried invoking the application by QTP Run and Record setting but QTP failed to recognize the objects (Go to Automation -> Record and Run Settings -> Java -> Open the following application when a record or run session begins

    2)We selected all the options under File -> Settings -> Java.

    3)We tried altering the settings under Tools -> Options -> Java -> Advance but still QTP didn’t recognize the objects.

    4)We tried altering the Environment variable _JAVA_OPTIONS and JAVA_TOOL_OPTIONS as well.

    NOTE
    _JAVA_OPTIONS = -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
    IBM_JAVA_OPTIONS = -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
    JAVA_TOOL_OPTIONS = -agentlib:jvmhook
    _classload_hook = jvmhook

    5) We coppied jvmhook.dll file from C:\Program Files\HP\QuickTest Professional\bin\java_shared\bin to

    6) When we do Object Spy the only meaningful TO Property we get is
    Nativeclass : SunAwtDialog
    object class : SunAwtDialog
    regexpwndclass : SunAwtDialog
    regexpwndtitle : ShipSite.CustomerMenu

    Thanks
    Manikanta

    Comment by Manikanta | April 2, 2009 | Reply

    • I’m also facing the same problem…
      Any Work arround for this issue…
      Some Body please help !!

      Comment by jagan | April 20, 2010 | Reply

  192. Enjoying reading your blog. Hard work always pays off.

    Comment by compositeeffectz | April 8, 2009 | Reply

  193. Hi Mohan,
    1) I want to work on the remote machine .QTP is intalled on my machine and i have to automate the application in remote machine through RDP and NX client connection.how can i be record or indentify object in the remote desk top.
    2) In those machine one OS is Windows and other is linux i have work on windows but LINUX i dont know.Please tell me how to work on LINUX OS in remote machine

    I dont know how to do, i am facing serious problem with both the issueplz help me out with this problem. will be very thankful

    Comment by upendra | April 8, 2009 | Reply

  194. Hi Mohan,,
    yesterday i posted a query ,but i got deleted .please help me its urgent.

    1) I have to work on the remote machine.Qto is installed on my machine and i need to record and automate the application present on the remote machine,can u please tell me how can it be done.
    2)I have to also work in LINUX enovirnoment ,bit i have never worked on QTP in LINUX OS .please guide me how to do.

    Would be very thankful to u.

    Comment by upendra | April 9, 2009 | Reply

  195. upendra,

    Are you talking about the cutrix remote machne, if yes you have to install the qtp on the citrix whre the application located. please go through the following lnk to get more info.

    http://www.sqaforums.com/showflat.php?Cat=0&Board=UBB20&Number=556924&Searchpage=4&Main=526581&Words=remote+machine&topic=&Search=true#Post556924

    Comment by quicktestprofessional | April 9, 2009 | Reply

  196. Hi Mohan ,
    We are not using Citrix machine We are using 3 types of connection Remote desktop connecttion,VNC and NX xlint for connecting to the other database .
    In the Remote desk top we need to connect to the remote desk top and automate the application.But the QTP in installed on my machine not in the remote machine.
    Same is the case with the NX Client I tried to automate it but it is not able to recognice the ogject in the NX client

    Comment by upendra | April 9, 2009 | Reply

  197. It is a simple remote desktop as we connect through accesories and ip address………..how can i use QTP on that when QTP in installed on my machine and not on the remote machine which have the application

    Comment by upendra | April 9, 2009 | Reply

  198. Hi,

    I am new in QTP.
    Please send step to step learning material if you can, for the nacent QTP user.
    My mail Id is richa.singh.mn@gmail.com

    Thanks in advance.

    Comment by Richa Singh | April 9, 2009 | Reply

  199. Hi mohan.
    i am a newbie for QTP i have only a bit of its operational knowledge. i want to be an expert but i also dont have much of the programming knowledge. could u plz giv me some docs from which i can strt frm the scratch on the way of mastering QTP.

    One problem that I am facing is that Active screen is not coming. For that wt to do?

    I have try many things which where on the net but not got.
    wt to do?

    Comment by Richa Singh | April 9, 2009 | Reply

  200. Hi All,
    How to get the line number which i am currently executing in QTP?

    Example :

    2 ————
    3 ————
    4 abc()
    5 ————
    6 ————

    The purpose of this function abc should be to get the line no (i.e., 4)

    Is it possible??
    Please Reply me ASAP.

    Regards,
    Judit

    Comment by Judit Raj | April 9, 2009 | Reply

  201. Hi All,
    How to get the line number of the function invocation in QTP?

    Example :

    2 ————
    3 ————
    4 abc()
    5 ————
    6 ————

    The purpose of this function abc should be to get the line no (i.e., 4)

    Is it possible??
    Please Reply me ASAP.

    Regards,
    Judit

    Comment by Judit Raj | April 9, 2009 | Reply

  202. Well, like i readed alot of your post i wanted to say thank you at least one time.

    julie.

    Comment by Julie Straus | April 12, 2009 | Reply

  203. Hi Mohan
    I have a small question. My application is in .NET environment, and we work with session variables. When ever we need the session variables needed to be changed that will be done by developers with config files. Is there a possibility to change the session variables by initiating the config files through QTP?
    One of my session variable look like this.

    Session(*hciCustomerName)=””
    Session(*hciIncidentXTO)=”xto”
    Session(*IsAgriliance)=””

    Sowmini

    Comment by Sowmini | April 13, 2009 | Reply

  204. Hi Mohan

    I am using QTP9.5 to do a data driven test on a dot net application, after 3 iterations the application freezes.

    any potential reasons and help is much appreciated.

    thank you

    Comment by maruti | April 14, 2009 | Reply

  205. Hi Mohan,

    1) Can u tell me wat is Silent installation of QTP and how to do it.

    2)I send a mail regarding RDPand i got this responce can you please tell me the meaning of this statement.
    “Are you guys using VMs to deploy your machines? If so, you could probably getting away of testing against the VM image and then cookie cut the rest of the environments”

    Comment by upendra | April 21, 2009 | Reply

  206. Hey Mohan – thank you so much for posting all this knowledge online – this is like a treasure chest, most informative and comprehensive – better than anything I have ever seen. You are a true scholar. I was wondering if you could advise me on the following matter:
    Is it possible to read data from command prompt? I need to create a test for the process, where user actions result in messages being displayed in the console. Is there any way for QTP to capture/read these messages?
    Thank you very much,
    Yan

    Comment by Yan | April 22, 2009 | Reply

  207. Yan,
    The easiest way is to use GetVisibleText method to get the data from the command prompt.
    here is the example:

    msgbox Window(“C:\WINDOWS\system32\cmd.exe”).GetVisibleText(-1,-1,-1,-1)

    Hope this will solve the query.

    Comment by quicktestprofessional | April 22, 2009 | Reply

  208. Hi Mohan,

    Recently, we have got new requirement to use QTP so i’m novice in QTP. When I was searching for QTP tutorial and found this website in between.

    Could you please help me out? Thanks a lot in advance.

    Ram :)

    Comment by Rambabu | April 22, 2009 | Reply

  209. Hi Mohan,

    I really stuck up with automation of DevExpress Treelist control. I have to find a node in the treelist and perform a rightclick or leftclick on that particular node and a contextmenu will be displayed.

    I am not able to perform click on a node. Is there anyway to get the location of the node.

    Comment by praveen | April 24, 2009 | Reply

  210. Hi Mohan,
    I have a small problem in OTA,the problem is to find the Test Name of a Test Case given its Test ID in the Test Plan Module,also i dont know the folder structure of the test plan,so my problem is to first search for the Test ID right from the Root directory locate it and then extract its Test Name.

    Is there a way to search for the test id from the root.

    Comment by prasad | April 24, 2009 | Reply

  211. I searched on google and I had a hard time located the right info….until I found your blog.

    Comment by No Reciprocal Directory | April 24, 2009 | Reply

  212. Useful information. Helped me figure out few things. Keep up the good work.

    Comment by SEO Consultant India | April 26, 2009 | Reply

  213. I Love your blog on google and have read many of your posts. Excellent. Keep up the good work!!!

    Comment by Paul Daniel | April 26, 2009 | Reply

  214. Hi Mohan,
    great work. Big thanks to you. Very useful information. keep up the good work.

    Comment by Manoj | April 27, 2009 | Reply

  215. Hi Mohan,
    Can you please tell me how to create response file for silent installation of QTP.Do u have the code for it .

    Comment by upendra | April 27, 2009 | Reply

  216. Looks like I found another great site to add to my feed reader. Mark

    Comment by marko hansen | April 30, 2009 | Reply

  217. Keep up the good work. Look forward to reading more from you in the future.

    Comment by rossgeller | May 4, 2009 | Reply

  218. Hi,
    I’m unable to run this script. I have msgbox that displays “test” as message output. I copied and pasted the code:

    Set sh = CreateObject(Scripting.Shell)
    sh.Popup message content, 5, msg header, (0+4) “test”

    It says Invalid Character.
    Plz help.

    - A

    Comment by Abhijeet | May 6, 2009 | Reply

  219. Hi Mohan

    Working on .net application SwfTable control using QTP 9.5 with .net addon under Windows XP operating system.

    I am trying to open a new window”Security properties” through double click on a table cell.

    When I replay the script QTP is doing nothing other than highlighting the cell.

    More over QTP is reading the cell data by coordinated rather the cell text.
    My test case is to pass the cell data through external data file(say note pad/excel), then after reading the data from this external data source QTP needs to double click on that particular cell text to open the “Security Properties” window.

    When I double click on the pointed security , it opens the below screen”Security properties”. Below is the code to open the “Security properties window”.

    SwfWindow(“InvestmentManager – Automation”).SwfWindow(“Targeter – CDO Fund”).SwfTable(“preTradesGrid”).SelectCell 17,1

    But during replay QTP is doing nothing other than just highlighting the cell without opening the security properties window.

    But If I replaced the “SelectCell” with “Activatecell” method QTP is opening the Security properties window which is fine. But I want to open the “Security properties window” based on the names which will be read from external data file(say excel) in cells rather than the coordinates.

    Ex: SwfWindow(“InvestmentManager – Automation”).SwfWindow(“Targeter – CDO Fund”).SwfTable(“preTradesGrid”).ActivateCell “Liability 20071215” where in the
    “Liability 20071215” needs to read from the external data file.

    If you need further information I can send you an attachemnet.

    Response is much appreciated.
    thank you
    maruti

    Comment by maruti | May 8, 2009 | Reply

  220. Good work mohan especiall Excel Automation.

    Comment by Naresh | May 8, 2009 | Reply

  221. HI Mohan,
    Thanks for help and support always.great job I need ur help.
    My scenario is that i need to login and the click on the link and sub link which have this notation (a square with plus sign in it +link name).When i try to record it through QTP then it is not able to rcord the left panel (link are on the left panel and after clicking these link search button comes in the right panel) of the browser,and soon as it comes in the right panel it is able to indentify.Is there any way or code so that QTP will be able to click on the +link and expand them .wat approach should i follow so that it is able to recognize the link.I tried with tab and arrow but browser dosent support .Type micTab.
    I am not able to expand the link in the left.wat should i do
    When i m identifying the link throuhj Object spy then it show this flow

    Browser: name
    Page:name
    Webtable:name
    Image:name

    It is identifyting it as image

    Please help me out

    Comment by upendra | May 13, 2009 | Reply

  222. Very nice information. Thanks for this.

    Regards,
    Mike

    Comment by Make Money Online Blog | May 13, 2009 | Reply

  223. Hello Mohan,

    I need to validate a value of an edit box that is present in a weblist. “01″ is the value displayed, But when i tried getcelldata(row,col) it is retreving null value. . The webtable will be like “I should get the value from 1st row 1st column and than i should be able to get the value from 1st row 3rd column (which will be a web edit). Please help me in this

    Thanks,
    Bhagawati
    bhagawati.manukonda@gmail.com

    Comment by Bhagawati | May 13, 2009 | Reply

  224. Thanks for sharing to others.

    Comment by Jujur Penglihatan | May 17, 2009 | Reply

  225. Thanks for sharing to others.

    Comment by Jurutera Kapal Angkasa | May 17, 2009 | Reply

  226. Your post was really interesting and its nice to see some good quality information, but would you recomend any where to get more information about this?

    Comment by Alesha | May 18, 2009 | Reply

  227. just stopped by to say i really liked your site – you’ve obviously put some hard work into it!

    Comment by liz thwaite | May 19, 2009 | Reply

  228. Not everyone can share good information on the net. Have a nice day, pal.

    Comment by moues | May 21, 2009 | Reply

  229. Hi All,

    I am using QTP 9.5 and selected Web and java Add-ins as my application is a java application. There is a JavaTree like object in my application. But while spying it gives
    Browser(“Project Management”).Page(“Project Management”).Frame(“frmapplication”).JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”) I want to click on a particular tree link.
    Can anyone help me in this ASAP.

    i tried with JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”).Object.expandAll
    JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”).Object.collapseAll it is working fine but not able to select or click on a text or node in the tree.

    Regards,
    Judit

    Comment by Judit Raj | May 21, 2009 | Reply

  230. Hi Mohan,

    I am using QTP 9.5 and selected Web and java Add-ins as my application is a java application. There is a JavaTree like object in my application. But while spying it gives
    Browser(“Project Management”).Page(“Project Management”).Frame(“frmapplication”).JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”) I want to click on a particular tree link.
    Can you help me in this ASAP.

    i tried with JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”).Object.expandAll
    JavaApplet(“frmAppletApplication”).JavaObject(“objNavTreeView”).Object.collapseAll it is working fine but not able to select or click on a text or node in the tree.

    Regards,
    Judit

    Comment by Judit Raj | May 21, 2009 | Reply

  231. Dear

    I have strated QTP, but i don’t know how to start writing script, plz do help me

    Comment by prabu | May 21, 2009 | Reply

  232. Hi Mohan,

    I am new to this blog…
    I have just started leaning QTP, but could not understand how to implement it practically.
    In starting I am trying to record a script on yatra.com booking engine to search the flights and read the valued (Origin City, Destination City, Depart date and Return date) from data table. But I am not able to do this….
    So please guide me how should I start learning QTP

    Regards
    Vishal

    Comment by Vishal Gupta | May 26, 2009 | Reply

  233. Hi Mohan,

    Plz let me know if we can read PDF file with QTP.

    Comment by Pavitra Tandon | May 27, 2009 | Reply

  234. Very helpful! Look forward to reading more ;)

    Comment by Barry | May 31, 2009 | Reply

  235. Hi

    Take an example of GOOGLE. Whenever a search is made, search count is shown in Bold. However count is no more displayed there in Label or Text field otherwise getting count dynamically was easy. How can we get search count dynamically in Data table or any variable whenever a new search is made.

    Thanks

    Comment by Wahaj | June 4, 2009 | Reply

  236. Very nice information. Thanks for sharing.

    Comment by david stern | June 4, 2009 | Reply

  237. I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

    Comment by viaggi | June 6, 2009 | Reply

  238. Hi Mohan,

    Hope you can help me out in finding a solution for the below question.

    My application has several pages and each page has some common text. I wanted to perform an action only when that text is shown. I added that WebElement into the object repository and moved it under the root. I scripted such that if the WebElement object exist then pass the script othewise fail. But sometimes the script recognises the WebElement and sometimes it won’t. Not sure why? I have used regular expression for that web element. Is there any way that I can do rather than adding that web element to each and every page of the object repository?

    Looking forward for your reply.

    Thanks,
    Ganesh

    Comment by Ganesh | June 11, 2009 | Reply

  239. A very nice niche blog, and a good design there sparks Simplicity yet complex algorithm of the internet. Thanks man You rock .

    Comment by Gabby | June 11, 2009 | Reply

  240. Hi Mohan,

    Really Good Work yar… After reading ur answers learned a lot thank very much..

    Thanks & Regards,

    Sreekanth
    9885987468

    Comment by Sreekanth Peetla | June 12, 2009 | Reply

  241. Can I have the script for ” How to capture the unread mailz from the gmail(or yahoomail) inbox.

    Thnaks & Regards,

    Sreekanth
    9885987468

    Comment by Sreekanth Peetla | June 12, 2009 | Reply

  242. I was actually looking for related business sites, but stumbled across yours on Google!! I’m actually quite interested so will keep an eye out for updates :)

    Comment by free ipods | June 16, 2009 | Reply

  243. I am planning to do QTP Exam. Could anyone send me dumps or set of question papers or some links to check my confidence level

    Comment by novic | June 16, 2009 | Reply

  244. Hi Mohan,

    You are really doing a great job.As I am not working more on QTP as my current profile but desires to get exposure on that. This website is helping me a lot to do my job and getting knowledge of QTP.

    Thanks and Best of Luc !!

    Comment by Tulika | June 17, 2009 | Reply

  245. Very well thought out and informative. I’m sure many others enjoy reading this too, but are just a little scared to post – anyway – thanks again!

    Comment by MySpace Friend Adder | June 21, 2009 | Reply

  246. Hi,

    please can U help me . we are facing below problem with QTP 9.5 :

    urs is web-based java application. i am facing problems while identifying objects. QTP able to identify all object at page before selecting list-item but not after selection of list-item.while spying able to get one browser and page object but not all objects….

    please help me on this…

    Comment by raja | June 21, 2009 | Reply

  247. Hi Mohan,
    i am new to this blog,
    i have a query regarding QTP.one of my friend has developed a framework in QTP on application which basically places order for online shopping.As per the functionality if there are is ant error while placing order, an email including the snapshot is send to the respective e-mail id which is entered while placing an order.we are facing an issue that the snapshot which we receive attached to the mail is shown as blank and the subject line s also wrong.we are not able to diagnose this issue
    could you please help us out in solving this issue

    Thanks,
    Hari

    Comment by Hari | June 22, 2009 | Reply

  248. Hi MOhan,

    First of all let me congratulate for doing a gr888 job!!
    Could you please let me know that suppose i have N no. of users and i have to Divide the users in 4 different xls based on alphabets,i.e.A-E, F-L, M-S and T-Z IN QTP..
    How will i do that?

    Thanks,
    Shruti

    Comment by shruti | June 30, 2009 | Reply

  249. Hi,

    In my web application, two windows are opened with same title. I need to identify both of the windows seperately. Please clarify this.
    Browser: IE 7

    I have tried by adding in the OR, smart identification, ordinal identifiers also.

    Thanks,
    Bhagawati

    Comment by Bhagawati | July 2, 2009 | Reply

  250. Hi Mohan,
    How can i loop through ADO recordset?.I have three columns in my
    recordset.First column has all blob fieilds which i want save as xml
    file with names from that of the second column.

    Here is my code:

    Set dbc_conn = CreateObject(“ADODB.Connection”)
    dbc_conn.Open “Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xx.xx.xxx)(PORT=1521)))(CONNECT_DATA=(SID=W245Q)(SERVER=DEDICATED)));User Id=ah_pvellan;Password=xxxx;”

    set rs= createobject(“adodb.recordset”)
    sql=”select a.IE_message_body,a.REQUEST_TYPE from t_hbs_ie_message a, t_hbs_ie_transaction b where b.confirmation_no =”HAMST_78″”
    msgbox sql
    rs.open sql, dbc_conn,1,3

    const strDirectory = “C:\Documents and Settings\pvellan\Messages\”

    Do until rs.EOF
    If Not IsNull(rs!REQUEST_TYPE) Then
    strFileName= strDirectory&rs.Fields(“REQUEST_TYPE”)&”.”&xml
    End If

    writeBinaryFile rs.Fields(“IE_MESSAGE_BODY”).value,strFileName
    rs.MoveNext

    Loop

    When i try excecuting the above code, i get VB compilation error.End of statement expected “)”

    Can you help me out with this?

    Thanks,
    Lisa

    Comment by Lisa | July 4, 2009 | Reply

  251. This website is very helpful as Im new into this.Good source of informations.Will add to my RSS feed.
    Thans.
    jean

    Comment by jean jameson | July 7, 2009 | Reply

  252. Thanks for sharing informations.Looking forward to more stuff.

    Comment by john daily | July 10, 2009 | Reply

  253. I appreciate when people enjoy sharing knowledge .Thanks for informations

    Comment by Mark Kinch | July 11, 2009 | Reply

  254. Hi Suresh,
    i am trying invoke QTP from vb script under automation object model and load libraries with Executefile “path of the .vbs file”
    the problem is i am getting an error
    —————————
    Windows Script Host
    —————————
    Script: C:\QTPWeb\QTP_settings_v1.00.vbs
    Line: 64
    Char: 3
    Error: Type mismatch: ‘ExecuteFile’
    Code: 800A000D
    Source: Microsoft VBScript runtime error

    —————————
    OK
    —————————
    please let me what is the solution for this issue.

    Comment by Tejaswi | July 17, 2009 | Reply

  255. Hi, Can you help me, i’m trying to select one column in teh Data Table of the action2, delete the current values and paste in the same column new values (from clipboard). How to write this in the action1 code? Thanks,Claudia Warsz

    Comment by Claudia Warsz | July 22, 2009 | Reply

  256. Hi Mohan…:)
    hope thingz sailing @ u side great na,
    thz iz sudheer,
    i’ve been involved @ QTP from past 1yr,
    think so u’ve awesome scripting knowledge @ QTP,
    i’ve read all u r scriptz,
    thoz r very nice,
    can i ask u r help if i get any doubt @ QTP,
    may i’ve u r mail id plz,
    if u don mind,
    thank u very much,
    have a great n cheerful time ahead…:)

    Comment by SUDHEER | July 22, 2009 | Reply

  257. Hai Mohan

    I visited u r blog, happy to get help from it.

    I need a script how to select a particular item from ActiveX combo box?

    Comment by Veerendra | July 23, 2009 | Reply

  258. Hi Mohan,
    I am automating windows application which was developed on >NET framework . So i use .NET, ActiveX and windows add ins. The left navigation of my application is recorded as a single winobject. When i click on any item in the navigation tree, it is recorded with specific to the ordinates. This is a problem as it becomes machine dependent (resolution dependant and depends on settings).
    Could you please suggest me how to resolve this problem so that the navigation is generalised.

    Comment by cherla | July 24, 2009 | Reply

  259. Hey mohan,
    Nice work ! very few people will do this kind of job Am also qtp expert but don’t have patience to read and answer the queries really great work .
    regards,
    romy.

    Comment by Romia | July 27, 2009 | Reply

  260. Hi Mohan,
    I’ve been given the task to explore the best way to generate QTP10 tests from within another application (a test script generator generates test scripts which should then be exported in QTP10 format and later executed with QTP10).
    I’ve been unsuccessfully searching the web for a QTP10 test file format specification.
    I’ve skimmed the QuickTest automation object model help file and some web entries about it but I’m still not sure if it can be used for that or just for “configuring QTP options and running tests”.
    Could you please help me with info about:
    1. Can a QTP10 test files format be found on the web and where (to solve it with a converter)?
    2. Can QTP QuickTest automation object model be used to create complete tests?
    3. If both ways are possible, what do you think which way would be better/easier?
    This info would be a lifesaver for me since I have to report my findings tomorrow (Wednesday), perhaps prolong it to Thursday.
    Thx
    Zdenko Blazevic

    Comment by Zdenko Blazevic | July 28, 2009 | Reply

  261. Hi,

    I have provided the password as “mercury” in the Flights application.I encrypted it using the Password Encryption tool that comes with QTP.
    Now when I am reading the properties of the Password textbox I see that the value for the property “Text” for this Password editbox is empty!And in no other property is the textvalue shown.How to fetch the value/text from a edit box when the text is in encrypted format?
    Please help.
    Many Thanks!

    Comment by Renu | July 30, 2009 | Reply

  262. This is actually some Very nice information. Thanks for this.

    Comment by Teresa James | July 30, 2009 | Reply

  263. A good post, thanks for sharing this stuff.

    Comment by Mike darley | August 9, 2009 | Reply

  264. Hi,

    I like to implement QTP in my application . I need Installation document and QTP implementation for the analysis . Could you send me those docs to me?

    Thanks In Advance

    Thanks,
    Mohan Kumar

    Comment by Mohan | August 13, 2009 | Reply

  265. Hi Mohan,

    Really good going, thanks for these informations.

    I am finding some problems with WebElement in QTP (Not using Descriptive Programming in my scripting)

    There will be a Link after clicking that the WebElement displays as “This is 28 Day View” again if i click the same Link it displays as “This is 14 Day View”

    Now i have used Regular Expression as “This is\. .*” for the innertext at WebElement in Object Repository

    If i Run the script it Displayed the Error saying like Object repository not found.

    Can you please help me on this. Thanks in Advance

    Regards,
    Suresh

    Comment by Suresh | August 27, 2009 | Reply

  266. I am a starter in QTP. have u got any information about GUI regression testing

    Comment by eash chand | August 30, 2009 | Reply

  267. Hi mohan,

    You are doing woderful service to the testing industry.
    I generally visit your site for any solutions.

    Good Work.

    Regards
    Subu

    Comment by Subu | September 4, 2009 | Reply

  268. Hi Mohan,

    Nice work. It really helped me a lot. Thanks a lot.
    Expecting to see more in future.

    Thank you,

    Comment by Mallesh | September 8, 2009 | Reply

  269. Hi Mohan,

    Can you just tell me the procedure to get the row ID of a particular row using QTP.

    To be more clear if the rowid of a column is 45.How can i get that number using QTP?

    Comment by Bobby | September 9, 2009 | Reply

    • scenario: Need to run a test script on 5000 machines, its kinda regression testing.
      The 5000 workstations are located in different cities but are all in the same domain and are accessible remotely via RDP.
      All the workstations have QTP installed on them. LoginId has admin rights to all the machines.
      Have installed QC Remote Agent, QC QTP Addin on all the workstations.
      Wondering if I can use QC to run the scripts remotely on these machines.
      But the issue was how to add the 5000 hosts(ip addresses) dynamically in the QC to invoke QTP scripts on other machines after completing on one machine.
      Is it possible to use tables of QC, how do I use the OTA API here, as I’m new using that.
      Kumar
      6128172620

      Comment by Kumar | October 15, 2009 | Reply

  270. Just to make you aware:
    The development of the Phoenix AZ region, has inspired the construction of homes, estates and businesses; and unintentionally created an oasis for pests. Readily available food and water, contribute to the growth, development and spread of Phoenix pest control problems. As a result, the proliferation of Phoenix pest control problems like the Fire Ant, Scorpion and Black Widow Spider; have caused more damage to real estate in the United States, than fires and storms combined.

    Comment by Phoenix Pest Control | September 16, 2009 | Reply

  271. Hi Mohan,

    Gud work………….

    Is there any alternative way for Recovery Scenario except if…else

    Thx
    Sailu

    Comment by Sailaja | September 22, 2009 | Reply

  272. Hi Mohan,

    can you tell me how to capture the secure code on a website and code it using the VBScript in QTP. Below is the site I am using to send free sms.
    http://www.text4free.net/

    Thank You,
    Padma

    Comment by Padma | September 25, 2009 | Reply

  273. Hi mohan,

    I saw in your web site about merging two excel document,

    Can you provide a code to merge two or more Msword that has screenshot and Text in both documents and merge into one single document.

    Thanks,VVs

    Comment by vvr | October 3, 2009 | Reply

  274. Hi mohan,

    I need a qtp script to merge 2 or more word documents into one document.

    each word document has text and screenshot in it.

    can you please send the script ?

    Thanks,
    vishal

    Comment by vishal | October 3, 2009 | Reply

  275. I need a script to add headers and footers in word document.

    can somebody reply ASAP

    Thanks,

    Comment by vishal | October 3, 2009 | Reply

  276. Hi Mohan,

    Can you post the qtp script to insert header and footer in the msword doc?

    Comment by vvr | October 7, 2009 | Reply

  277. Hi,

    I saw ur bolg today first time, it is awsome…
    I need one favor from u.
    I have start Run scripts from QC automatically, when i received a email. If it is possible please help in this regard..
    thanks advanced

    Regards,
    Ashok

    Comment by ashok | October 8, 2009 | Reply

  278. ABEY! MAAA key LAUDEY! STOP spammin my friends facebook! chutiye! teri gaand maarunga Afghanistan se aa key!

    Haraam khor! 4 goliyaan teri gaand mein daalonga to thujhey paata chalega! Raaaa ke lund

    Comment by sherkhan_theonlyone | October 11, 2009 | Reply

  279. Hi Mohan,

    How to write user defined functions in QTP?i want to know how to create functions right from the scratch.Please help me of how to create user defined functions in easiest and simple way.

    Comment by Revathi | October 14, 2009 | Reply

  280. hi.need help in qtp.i want to learn qtp can u give basic suggestios in this plz.

    Comment by ashok | October 19, 2009 | Reply

  281. hi , i want to learn qtp can u give assistence to me plz sir.

    Comment by ashok | October 19, 2009 | Reply

  282. HI.

    I am unable to view the result window in QTP 10.0 even i have set all the option that are required specially Tool-option-run, but window does not appear at end of session. I can not even open the window when i click the result icon on the screen. Please help me out. Your early response will be highly appreciated.

    Comment by Khisal | October 20, 2009 | Reply

  283. Hello Mohan,

    Can you please help\guide me for an QTP script which creates User in Test Director (Quality Center).

    Regards
    Tahir

    Comment by Tahir | October 21, 2009 | Reply

  284. Hello Mohan,

    Can you please help\guide me for an QTP script which creates User in Test Director (Quality Center).

    Regards
    Tahir Naim

    Comment by Tahir | October 21, 2009 | Reply

  285. Hi Mohan,
    We have a requirement where we have to test a report which is a PDF. There is some static and dynamic text in that report. The static text depends on employee data for ex. name and his stats etc is dynamic where rest of the text is static.

    There are almost 16 pages of report out of which 10-30 words will be dynamic (which are taken from DB).

    Can you please suggest how to test this and also the best tool to automate this? QTP???

    Thanks in advance!

    Comment by Sravanthi | October 24, 2009 | Reply

  286. Hi All,
    We have a requirement where we have to test a report which is a PDF. There is some static and dynamic text in that report. The static text depends on employee data for ex. name and his stats etc is dynamic where rest of the text is static.

    There are almost 16 pages of report out of which 10-30 words will be dynamic (which will be fetched by DB)

    Can you please suggest how to test this and also the best tool to automate this?

    Thanks in advance!

    Comment by Sravanthi | October 24, 2009 | Reply

  287. Great information and great site, I have added this to my favorites, do you have an rss feed I can subscribe too?

    Comment by Internet Search | November 4, 2009 | Reply

  288. Hi Mohan,

    Ours is a 64 bit application and it is written in MFC (VC++) can we automate this aplication using QTP? QTP 10 version is recognizing these objects as winobjects is there any work around of how to automate this application?
    Its in a medical domain…

    Comment by Varsha | November 6, 2009 | Reply

  289. We have a desktop app we’d like to use automated testing on & wondering if QTP 10.0 supports it – it is a C++/MFC desktop app that uses QT UI Framework ? If not, are there any options with say QTP extensibility? And it is a 64 bit application.

    Comment by Varsha | November 6, 2009 | Reply

  290. Hi Mohan,
    How I can handle the dynamic download dialog box in QTP and wait till the file get downloaded?
    Scenarios is:
    1) Open a browser
    2) Click on download link
    3) Prompt for Save the file,click on Save button
    4) Set the location and click on save
    5) A Window comes with progress bar names as “1% of file name”
    6) I want that QTP will wait until the file get downloaded
    It works for one file, but when I want to downlaod another file with same script without modification I can’t do so
    because name file name is changed ion the dialog box
    What I can do that it can work for more than 2 files

    Thanks,
    Pawan

    Comment by Pawan | November 9, 2009 | Reply

  291. Hi Mohan,
    How I can handle the dynamic download dialog box in QTP and wait till the file get downloaded?
    Scenarios is:
    1) Open any web browser
    2) Click on any download link
    3) Prompt for Save the file,click on Save button
    4) Set the location and click on save
    5) A Window comes with progress bar names as “1% of file name”
    6) I want that QTP will wait until the file get downloaded
    It works for one file, but when I want to downlaod another file with same script without modification I can’t do so
    because name file name is changed ion the dialog box
    What I can do that it can work for more than 2 files

    Thanks,
    Pawan

    Comment by Pawan | November 9, 2009 | Reply

  292. Dear,

    I am not able to open my Yahoo mail ID. As it seems that i have forgotten my Password. Plus i am not able to retrive the say through security questions
    Please help me .

    Comment by Priti Khurana | November 20, 2009 | Reply

  293. Hi Mohan,
    this santoshkumar. Can u explain how to get the properties of third party controls ( Sync fussion Grids ) in QTP 9.2.

    waiting for reply
    Santosh (santosh.afz@gmail.com)

    Comment by Santoshkumar | November 25, 2009 | Reply

  294. Bravo, great article. Thanks for the effort to put it together.

    Comment by Coupon Script | December 5, 2009 | Reply

  295. Really very cool data, I will add to bookmarks this site, thanks geoff

    Comment by Proxy Guy | December 6, 2009 | Reply

  296. Hi Mohan,

    You Blog is very helpful.

    I need a solution to click a webelement in a table by searching a required cell, in the below code the webelement object is not recognizing.

    obj_UIPage.WebTable(“class:=scrollTable”,”html tag:=TABLE”).RowCount

    vIntRow=Int(obj_UIPage.WebTable(“class:=scrollTable”,”html tag:=TABLE”).GetROProperty(“rows”))

    ‘vIntCol=Int(obj_UIPage.WebTable(“class:=scrollTable”,”html tag:=TABLE”).GetROProperty(“cols”))

    vChkSlct=False
    For vIntRowIndex= 2 to vIntRow

    ‘ For vIntColIndex = 1 to vIntCol
    vStrReq=Trim(obj_UIPage.WebTable(“class:=scrollTable”,”html tag:=TABLE”).GetCellData(vIntRowIndex,4))

    vStrComp= StrComp(vStrReq, vStrChngTyp, 0)
    If vStrComp=0 Then
    vChkSlct=True
    msgbox vStrReq
    Set Obj_Link=obj_UIPage.WebTable(“class:=scrollTable”,”html tag:=TABLE”).ChildItem(vIntRowIndex,4,”WebElement”,0))
    If not Obj_Link is nothing Then
    Obj_Link.Click
    vChkSlct=True
    Reporter.ReportEvent micPass,”Approval List Screen”,vStrChngTyp&” – is available in the approval list”
    Else
    Reporter.ReportEvent 1,”Appoval List Screen”, vStrChngTyp& ” – is not recogniged”
    Exit for

    End If

    End if

    ‘ Next

    If vChkSlct=True Then
    Exit For
    End If

    Next

    If vChkSlct=False Then
    Reporter.ReportEvent 1,”Approval List Screen “””&vStrChngTyp&””””,”Does Not Exist – the approval list”
    End If

    Comment by Ayyappa Kulli | December 9, 2009 | Reply

  297. Hi Mohan,
    Good snippets u have put up.
    I am facing a small problem while using recordsets.
    When i try opening a stored procedure using “rs.open”,my SP executes but at the next line when i use “rs.recordcount” it says ‘Operation is not allowed when the object is closed’.Please help if u could,i have exhausted the web for a solution!

    Comment by Bharath | December 10, 2009 | Reply

  298. Hi Mohan,

    Very nice work done..really very helpful data on ur blog..

    I have few questions regarding the Web service add ins..I m trying to access the methods of a WCF service which uses a WSHTTPBinding or a NETTCPBinding using the Web services add ins provided in QTP. We are currently using the 10.0 version of QTP. I have few difficulties using this. It asks me for the Client Certificates and X509 certificates for accessing the methods. Have u ever tried to use this feature in QTP. If yes, can u please let me know how to forego these and go ahead with accessing the methods. Also does QTP supports WCF??

    Thanks,

    Krishna

    Comment by Krishna | December 15, 2009 | Reply

  299. Hi

    I got a new requirment for qtp automation..below is the REQ
    Before uploading excel file in portal …the spreadsheet needs to be validated with many permitations/combinations of each data cell in excel.

    How could achive this through QTP…need help..

    Thanks

    Comment by siri | December 17, 2009 | Reply

  300. Annaiah,

    Super annaiah blog vundi ani naku teledu

    Comment by Sandhya | January 12, 2010 | Reply

  301. Hi Mohan,
    please provide solution as possiable,In qtp “Object repository with parameter(in object repository manager)”
    i cannOT get the clear picture on that topic.
    Regards,
    vidyanand.D

    Comment by vidyanand.D | January 18, 2010 | Reply

  302. hi,

    i am working with QTP 9.2,but i have one dough ,i recorded one actions and it have 12 step,but i need 4 time iterate only 3 to 8 step,so what i need to do.

    Thanks and regards,
    Velmurugan.K
    9042616012

    Comment by Velmurugan | January 21, 2010 | Reply

  303. Hi Mohan,

    Im currently using QTP to automate some of the regression test cases of an application. It has some reporting functionality. We can select start and end date and run reports in the application. My question is how do i verify that the reports generated are correct?

    Can you guide me on this?

    Thanks
    Afreen

    Comment by Afreen | January 28, 2010 | Reply

  304. Hello sir,

    My name is Ajay S. I am working with Seed InfoTech Ltd. A Pune ( Maharashtra) based Institute for IT training & a software testing company as a senior subject matter Expert.
    Seed was established in 1994 & done training in software testing for more than 25000 candidates made us number one training providers in the field of Software Testing.

    Couple of months back we have started with our magazine on Software Testing- Beyond Testing!!!

    I am a regular visitor of your blog & came across fantastic articles on the same. My request to you is, if you could allow me to publish some of your articles in our magazine along with your blog ID so that our students will also get benefited from the same.

    My email ID is ajay.shembekar@seedinfotech.com
    it will be great if you could share your E-Mail ID & allow me to publish some of your articles.

    Thanks & Regards,
    Ajay Shembekar.

    Comment by Ajay S | February 1, 2010 | Reply

  305. Hi ,
    Iam working on a test where the report is saved to a shared directory location as .XLS (excel) file. QTP recorderd the below code in my application but while playing it it fails

    Dialog(“0% of fbcngapp.export.ajax”).Dialog(“Save As”).WinListView(“SysListView32″).Activate “FBCNG”
    Dialog(“0% of fbcngapp.export.ajax”).Dialog(“Save As”).WinListView(“SysListView32″).Activate “QA TEST_ REPORTS”
    Dialog(“0% of fbcngapp.export.ajax”).Dialog(“Save As”).WinEdit(“File name:”).Set “Smoke_Test_Prof_AuditRpt.xls”
    Dialog(“0% of fbcngapp.export.ajax”).Dialog(“Save As”).WinButton(“Save”).Click

    ERROR
    QTP unable to recognise “SysListView32″
    I have added the object to the repository

    Comment by Lakshmi | February 2, 2010 | Reply

  306. Thanks in advance Mohan.Thank you

    lakshmi

    Comment by Lakshmi | February 2, 2010 | Reply

  307. Hi Mohan,
    I am trying to automate a Legacy system with QTP. The application is like keyboard driven application. for example press 1, it will bring a screeen, enter name\ press enter brings up the user information. when i record it and played back. I got a error in object not found. when record it in low level recording then also it didnot work.

    How to find out what add in is required for QTP. so that the objects can be indentified. and we can replay it.

    Could you please give your thoughts on the same.

    Thank you,
    Ajish S.

    Comment by Ajish | February 5, 2010 | Reply

  308. hi mohan,

    am new to QTP as am getting trained on QTP , can u pls help me out by supporting few basic fundaments of QTP

    Comment by Sushma | February 8, 2010 | Reply

  309. plz provide me advanced concepts of QTP, like frame works

    Comment by anil | February 9, 2010 | Reply

  310. Hi Mohan,
    i need a help from u, in writing excel functions,
    our requirement is, for Ex
    1. we have 100 scripts in testdata file,
    2. now while executing, i want to import the testdata for that particular script which i’m executing and only that particular script data should be displayed in the run-time data table.

    Comment by Naga | February 10, 2010 | Reply

  311. nice Mohan.
    very good job u have done . can u give me knowledge of capturing data from picture, and have to use it in a data table?how it can be done?

    Comment by gyanendra | February 17, 2010 | Reply

  312. Hi Mohan,
    Looking for your help in solving one of my problem.

    One of my application developed on Delphi plaform and even the DelphiEdit object is identifies as DelphiObject. So instead of using Set method i used Type method to enter the values. Now when i want to enter Password in the Password DelphiObject, i just need to write the code this way….

    DelphiWindow(“DelphiWindow”).DelphiObject(“Password”).Type “Password”
    Here the catch is i have give my parameter directly i am not able to use the Encrypted password if i use that the type method will not decrypt the password.

    I found one thing in Help -> QTP Object Model Reference
    some line of codes…which is for encoding and use setSecure
    below is the same…
    pwd = “GetPasswordfromSomewhere”
    e_pwd = Crypt.Encrypt(pwd)
    Browser(“dfgd”).Dialog(“pass”).WinEdit(“pwd”).SetSecure e_pwd

    Do you have any idea about Decrypting and getting the value…

    i want my code to be in this fashion..i want to have the encrypted pwd (created from the password encoder tool) stored in local datasheet…and then decrypt it internally and use it with the Type method

    Pwd = fnDecrypt(DataTable(“p_in_EncryptedPwd”,dtLocalSheet))
    DelphiWindow(“DelphiWindow”).DelphiObject(“Password”).Type Pwd

    help me in writing the function fnDecrypt

    Thank u so much in Advance…your help is much appreciated

    Thanks
    Dinesh Robinson

    Comment by Dinesh Robinson | February 22, 2010 | Reply

  313. 1. Dim objAdCon
    2. Set objAdCon = CreateObject(“ADODB.Connection”)

    3. objAdCon.Open “DRIVER={Microsoft Access Driver (*.mdb)};DBQ=”&strFileName & “;Readonly=True”
    ————–
    Hi Mohan, i am very thankful to u as ur site really providing a lot of useful information,
    i need a small help from u, that,
    in the 3 line, how to create a DRIVER through system for any kind of database whether it is Access, SQL Server 2000/2005, Oracle etc…
    I have tried through Database check point in QTP, but i am not able to get,
    please help me out that i can do it in a easy way
    Thanks and Regards.

    Comment by Aravind | February 24, 2010 | Reply

  314. Hi Mohan,
    I have the Zip code with the combination of letters and numbers as follows
    L5R3G8
    If I want to check weather the first letter is the word is in word format and second letter in the word in number format and so on how can I do it. Please let me know. I need to do lot of progamming with it.
    Thanks
    Sowmini

    Comment by sowmini | March 3, 2010 | Reply

  315. Hey There,

    I’m new to QTP and debugging a DP script written by someone else who has left the position. Im actually having a hard time trying to find out why the script is not able to identify different objects although they do exists on screen.
    with (browser(“title:=.*”).page(“index:=0″))
    If (not .link(“name:=.*More Headlines.*”).exist(0))Then
    call assemble_reports(“warn”, “News”, 1)
    end if
    end with
    This link do exists on screen but its not identifying it, thats kind of weird. I can send u a screenshot of the script if you want to have a look in order to help me on this issue. Will truely appreciate your help.

    Thanks,
    Aarti

    Comment by Aarti | March 6, 2010 | Reply

  316. Hi Mohan,

    Am trying to connect to MQC9.2 through QTP9.5, when i gave the server details, i get the popup with the error message stating

    “Failed to update component from server” “Cannot find server https://qc92.voda.kunden.csl.de/qcbin

    But am able to connect the MQC9.2 through manually.

    I have installed all the addin ie,

    QuickTest_Add-in_for_Quality_Center.msi
    TDConnect.exe

    But one think i have observed, from QTP if i try to open any recent files (script) it shows error message ie,

    server : https://tdir.voda.kunden.csl.de/qcbin
    with user name & password edit box.

    we have recently moved from test director to MQC9.2

    am not getting where i need to change this sever details so that i can get connect to QC9.2

    Can you please help me out to resolve this issue ?

    Cheers,
    Vijay

    Comment by Vijay | March 9, 2010 | Reply

  317. Hi mohan garu,
    I like to do certification in QTP. I have only theoretical knowledge in QTP and i am practicing with QTP10.0 version in my home PC

    Can you please guide me how to prepare for QTP certification exam.! and application procedure !!

    Thank you
    surya

    Comment by suryanarayana raju | March 21, 2010 | Reply

  318. Hi Mohan,

    Thanks for sharing your knowledge. Great work!

    Regards,
    Ajay Bhagwat

    Comment by Ajay Bhagwat | March 23, 2010 | Reply

  319. Hi Mohan,

    Thanks for sharing your knowledge with us….

    Comment by Ram Mohan | March 24, 2010 | Reply

  320. Hi Mohan,
    I have question with ODBC – I am trying to get the name of a person from the database and try to store the value in the global datatable. I created the connection and I am able to get the value and store it in the global data table. Here the problem comes, when I run the ODBC connection as an individual action it is working fine but the same when I tried to call the action in another script the action is failing. I got the follwing error message.
    “Type mismatch: ‘MakeFullName’
    Line (54): “fullname = MakeFullName(ed1Name, ed2Name, edLastName, edInitial)”. ”

    I am not able to understood as the what problem is?
    The same when I run as individual action it is fetching the recording and saving it to global data table but when I insert this action in another script it is not working. May be I am missing some link. Can you please guide me in this regard.
    I am giving the entire code here for your reference.

    ‘@Description Get names of prepopulated educator
    Public Function GetPrepopulatedEducatorName(ByRef SchoolId, ByRef SubmissionPeriodId, ByRef FirstName, ByRef SecondName, ByRef LastName, ByRef Initial, ByRef EducatorNumber)
    Dim objRecSet ‘ As an ADODB Recordset object
    Dim strConn ‘ As a connection string
    Dim strQuery ‘ Query string
    Dim objConn ‘ As a connection object
    Dim ret, edNumber
    ret = False
    Set objConn = CreateObject(“ADODB.Connection”)
    Set objRecSet = CreateObject(“ADODB.Recordset”)
    strConn=”Driver={” & Environment(“DataBaseDriverName”) & “};SERVER=” & Environment (“DataBaseTNSName”) &_
    “;UID=” & Environment(“DataBaseUserId”) & “;PWD=” & Environment(“DataBasePassword”) & “;DBQ=” & Environment (“DataBaseTNSName”)
    strQuery = “select i.INDIVIDUAL_GIVEN_NAME, i.INDIVIDUAL_SECOND_NAME, i.INDIVIDUAL_LAST_NAME, i.INDIVIDUAL_MIDDLE_INITIALS from ” &_
    “individual i, educator e where i.individual_id = e.individual_id and e.educator_id in ” &_
    “(select educator_id from school_educator_assignment where school_id = 773423 and submission_period_id = 146041845 and ” &_
    “core_flag = ‘T’ group by educator_id having (count(educator_id) = 1))”
    objConn.Open strConn
    objRecSet.Open strQuery, objConn,3,3
    If objRecSet.RecordCount = 0 Then
    FirstName = “”
    SecondName = “”
    LastName = “”
    Initial = “”
    Else
    If objRecSet.RecordCount < EducatorNumber Then
    FirstName = ""
    SecondName = ""
    LastName = ""
    Initial = ""
    Else
    ret = True
    End If
    End If
    If ret = True Then
    objRecSet.MoveFirst
    edNumber = 1
    While edNumber < EducatorNumber
    objRecSet.MoveNext
    edNumber = edNumber + 1
    Wend
    FirstName = objRecSet.Fields.Item("INDIVIDUAL_GIVEN_NAME")
    SecondName = objRecSet.Fields.Item("INDIVIDUAL_SECOND_NAME")
    LastName = objRecSet.Fields.Item("INDIVIDUAL_LAST_NAME")
    Initial = objRecSet.Fields.Item("INDIVIDUAL_MIDDLE_INITIALS")
    End If
    objRecSet.Close
    objConn.Close
    Set objRecSet = Nothing
    Set objConn = Nothing
    GetPrepopulatedEducatorName = ret
    End Function

    If GetPrepopulatedEducatorName(schoolId, submissionPeriodId, ed1Name, ed2Name, edLastName, edInitial, 1) = True Then
    fullname = MakeFullName(ed1Name, ed2Name, edLastName, edInitial)
    End If
    msgbox fullname
    DataTable("Educator",dtGlobalSheet) = fullname

    —-
    I really need this issue to be solved as all my scripts are dependent on this logic. Hoping to get help from you
    Thanks
    sowmini

    Comment by sowmini | March 25, 2010 | Reply

  321. pls give me some vb scripts using qtp
    use with interview pls sir

    Comment by shaik mohinuddin | April 1, 2010 | Reply

  322. I am trying to execute QTP script through vbs file and report the result to QC > Test Lab > Test Set.
    I am unable to do that. Here is the sample code of which I am doing . Please help me

    ExecuteTest “[QualityCenter] Subject\QTP Automation Suite\CCMT\Reusable Scripts\In Progress\General\BatchRun1″

    Public Sub ExecuteTest(TestPath)

    Dim qtApp ‘As QuickTest.Application ‘ Declare the Application object variable
    Dim qtTest ‘As QuickTest.Test ‘ Declare a Test object variable
    Dim qtResultsOpt ‘As QuickTest.RunResultsOptions ‘ Declare a Run Results Options object variable

    Set qtApp = CreateObject(“QuickTest.Application”) ‘ Create the Application object
    qtApp.Launch ‘ Start QuickTest
    qtApp.Visible = True ‘ Make the QuickTest application visible

    ‘ Set QuickTest run options
    qtApp.Options.Run.ImageCaptureForTestResults = “OnError”
    qtApp.Options.Run.RunMode = “Fast”
    qtApp.Options.Run.ViewResults = True

    ‘This will Open a script
    qtApp.Open TestPath , True ‘ Open the test in read-only mode

    ‘ set run settings for the test
    Set qtTest = qtApp.Test
    qtTest.Settings.Run.IterationMode = “rngIterations” ‘ Run only iterations 2 to 4
    qtTest.Settings.Run.StartIteration = 1
    qtTest.Settings.Run.EndIteration = 1
    qtTest.Settings.Run.OnError = “NextStep” ‘ Instruct QuickTest to perform next step when error occurs

    ‘For Viewing Results
    Set qtResultsOpt = CreateObject(“QuickTest.RunResultsOptions”) ‘ Create the Run Results Options object
    qtResultsOpt.ResultsLocation = “Root\TELECOM QTP Automation Test Suite\CCMT\QA\Daily Runs\CCMT_eLicensing_DailyRuns” ‘ Set the results location
    qtTest.Run qtResultsOpt ‘ Run the test
    qtApp.Options.Run.ViewResults = True

    ‘Close QTP
    ‘qtTest.Close ‘ Close the test

    ‘Set the options to nothing
    Set qtResultsOpt = Nothing ‘ Release the Run Results Options object
    Set qtTest = Nothing ‘ Release the Test object
    Set qtApp = Nothing ‘ Release the Application object

    End Sub

    Comment by Ray | April 7, 2010 | Reply

  323. Hi mohan,

    I am trying to run QTP script through vbs file. I want to save the results to QC > Test Lab > Test Set.
    I searched on internet I found that we can execute the test set using vbs file but I am not sure how to do that..can you please send me the code for execute the test set in QC through vbs file.

    Comment by rajender teegala | April 7, 2010 | Reply

  324. Hi Mohan

    I am having a code that run QTP script through vbs file but I am not sure how to save the results to QC> test lab > test set.

    Code is:

    ExecuteTest “[QualityCenter] Subject\QTP Automation Suite\XXXX\Reusable Scripts\In Progress\General\BatchRun1″

    Public Sub ExecuteTest(TestPath)

    Dim qtApp ‘As QuickTest.Application ‘ Declare the Application object variable
    Dim qtTest ‘As QuickTest.Test ‘ Declare a Test object variable
    Dim qtResultsOpt ‘As QuickTest.RunResultsOptions ‘ Declare a Run Results Options object variable

    Set qtApp = CreateObject(“QuickTest.Application”) ‘ Create the Application object
    qtApp.Launch ‘ Start QuickTest
    qtApp.Visible = True ‘ Make the QuickTest application visible

    ‘ Set QuickTest run options
    qtApp.Options.Run.ImageCaptureForTestResults = “OnError”
    qtApp.Options.Run.RunMode = “Fast”
    qtApp.Options.Run.ViewResults = True

    ‘This will Open a script
    qtApp.Open TestPath , True ‘ Open the test in read-only mode

    ‘ set run settings for the test
    Set qtTest = qtApp.Test
    qtTest.Settings.Run.IterationMode = “rngIterations” ‘ Run only iterations 2 to 4
    qtTest.Settings.Run.StartIteration = 1
    qtTest.Settings.Run.EndIteration = 1
    qtTest.Settings.Run.OnError = “NextStep” ‘ Instruct QuickTest to perform next step when error occurs

    ‘For Viewing Results
    Set qtResultsOpt = CreateObject(“QuickTest.RunResultsOptions”) ‘ Create the Run Results Options object
    qtResultsOpt.ResultsLocation = “C:\Telecom Automation Scripts\Res1″ ‘ Set the results location
    qtTest.Run qtResultsOpt ‘ Run the test
    qtApp.Options.Run.ViewResults = True

    ‘Close QTP
    ‘qtTest.Close ‘ Close the test

    ‘Set the options to nothing
    Set qtResultsOpt = Nothing ‘ Release the Run Results Options object
    Set qtTest = Nothing ‘ Release the Test object
    Set qtApp = Nothing ‘ Release the Application object

    End Sub

    Comment by rajender teegala | April 7, 2010 | Reply

  325. Hi Mohan,

    I have webpage with radio group’s and check boxes.I need to answer all the questions irrespective of the objects.

    I could do that for radio’s as they are grouped.If i have 2 questions with options as radio’s.

    If I have 3 questions and all of them have checkbox as the options then with child obj it answers only fist question

    I have many webpages to validate,count of checkbox questions or radio buttons are not constant.

    Can you give any solution for this scenario?

    Comment by Vijay | April 7, 2010 | Reply

  326. hi this syam

    i want QTP faqs in programmatic and answers also

    in interview point of they r asking different type of programmatic questions please send me

    u r looking hand some its true i will wait for u r reply

    Comment by syam | April 12, 2010 | Reply

  327. hi,

    i have two files.one is (txt) file and another one is (rtf) file. i need to compare the text between two files. when i’m doing that test case is failing. i’m using Instr funtion to compare.

    pls help me how to handle this.

    Comment by chandu | April 15, 2010 | Reply

  328. Hi Mohan,
    I need to run a action(re-usable) creation of end user (10 records used global data driven in QTP).I tried making the setting run 1 to 10 in settings.
    And I am trying to call that action in another action where there are few other reusable action like start browser and login.
    My problem is it is trying to run all the action startbrowser and login 10 times, I want start browser and Login to run one time and creation of user 10 times, how can I do that? any help will be highly appreciated.
    Thanks,
    urmi

    Comment by Urmi | April 22, 2010 | Reply

  329. I tried to Navigate between the tabs automatically using the descriptive program

    Set Pco=Description.Create
    Pco(“Micclass”).value=”WebElement”
    Pco(“class”).value=”tabTab”
    Pco(“html tag”).value=”SPAN”

    ‘Pco(“innertext”).value= Reports
    Set oTab=Browser(“Report Builder – Home”).Page(“Report Builder – Home”).ChildObjects(Pco)
    iCount = oTab.count
    Msgbox iCount
    For i=0 to iCount -1
    Msgbox “Item ” & i &” Innertext = “& oTab.Item(i).GetROProperty(“innertext”)
    Pco(“innertext”).value=oTab.Item(i).GetROProperty(“innertext”)
    Browser(“Report Builder – Home”).Page(“Report Builder – Home”).WebElement(Pco).Click
    wait(3)
    ‘msgbox err.number
    ”On Error Resume Next
    Next
    General Error No: -2147467259

    But for First Two Tabs it will navigate sucessfully, for the third tab i am getting the General run error .Please guide me regarding the sane

    Thanks in Advance

    Comment by Anil Kumar N R | April 27, 2010 | Reply

  330. HI,

    i want to know the Think method in QTP. i could not able to find. do u know ? if so then can u tell me syntax.

    Thanks

    Comment by Neeraj | May 5, 2010 | Reply

  331. Hi Mohan,

    I have problem with .Net application. When I try to capture data from the SwfTable, code doesn’t retrieve any data. I msgbox the variable but it was blank.

    Comment by Mark Karl | May 6, 2010 | Reply

  332. Hi Mohan,

    I have been googling for a solution and you are my last hope. So glad to see your site. I am a QTP newbie and am not sure how to find answers to a problem I am having.

    Here’s the deal. I know how to record a simple script against PeopleSoft application web page. There is a column on the page where I need to find a matching value on the page and simulate clicking a check box next to the found value. I thought I could use IE (version 7)’s Edit > Find on this page feature. Unfortunately this is not recognized by QTP as a valid object.
    1) Is there a name for an IE tool bar object?
    2) Do you know of any sample script that I can view to understand how it can be done?

    Thanks a lot!!

    Comment by Jen Bachelder | May 7, 2010 | Reply

    • hi mohan you are doing a great job
      i have few queries

      1) i am looking for the script where qtp can captures the data in to excel sheets from drop down list

      2) and i need to validate the captured data with data base data
      thank you

      Comment by trinath | August 27, 2010 | Reply

    • hi
      will you please send the screenshots or link that you used?

      Comment by Sathiya | April 29, 2011 | Reply

  333. Hi, Friends i had so many doubts in keyword driven frame work.
    we are working on Key word driven frame work.
    here we are using descriptive programming.
    we need to fill excel sheet using those data we can find the objects in the application and doing operations.
    in the excel sheet we can specify button, edit boxes names. how to do it. all these things.

    Comment by pandu | May 17, 2010 | Reply

  334. hi.
    That tips are great, thank you ..
    I love your blog…
    thank you again carry on…

    Comment by GoldSalebol | May 23, 2010 | Reply

  335. We have many reports in our web based application with option of download in excel format or we can view the report in html format.

    Can u suggest any method in which i can compare the values of html on the application and the value in the downloaded excel file…………..!!!

    Comment by Amit Pandey | June 7, 2010 | Reply

  336. This is Manjanna, I need a help from anyone, I am clicking QTP Icon in QC to launch QTP. Qulality Center is displayed the below error message.

    “Can not create Remote Agent.
    Check testing tool installation.”

    Comment by Manjanna | June 10, 2010 | Reply

  337. Hi Mohan,
    I have worked as a manual tester with 2 years exp. I want to learn QTP. I have started practicing on the software. How should i start learning scripting. Can u please guide me with this.

    Thanks

    Comment by Manaswitha | June 16, 2010 | Reply

  338. Hi,

    Thanks for excellent scripts.

    Question, I try to read gmail message with QTP but fail to access the message in inbox.

    Do you know why ?

    working with QTP 9.0

    Comment by Hagai | June 17, 2010 | Reply

  339. Hi
    i am new this blog. i just started in Testing field. can u guide me how to get experience in QTP and where i can free download QTP etc plzzzzzzzzzzzz
    thanks in advance

    Comment by kanaka mikkilineni | June 24, 2010 | Reply

  340. Hi Mohan,

    I am new to ur blog and the information available on your blogs is really helpful for all the QTP new commers.

    i have a small question and i couldnt figure out the issue and I have windows application and i have written a code and it is working fine when the workstation is logged as Admin. but when the workstation is logged in as non Admin and trying to launch the application through ‘cmd, prompt by giving the Admin and password and it is working fine.

    But at one point, iam getting an unspecified error … when iam trying to read the list of items available in the object WinTreeList.

    Could be able to give me some suggestions.. i tried couple of options and the code is working fine when i launch normally.

    Thanks

    Prakash

    Comment by Prakashsai | July 7, 2010 | Reply

    • Hello Mohan,

      I am getting “Unspecified Error” when at the below line. This line works fine at Windows XP but at Vista it is throwing error.

      Str1 = Window(“ProgramWindow”).WinToolbar(“Running Applications”).GetContent

      Any help would be greatly appreciated.

      Thanks in advance
      Barkha

      Comment by BarkhaMishra | July 30, 2011 | Reply

  341. Hi Mohan,

    This is regarding the Addin for QTP which I need to have to use SendKeys method. as of now I have three basic addins, and as of now I am working on Microsoft Dynamic CRM and not able to Use the SendKeys method for the textbox and on Spying the Object SendKeys method in not present in both the RO and TO methods for the Edit box, can you please give me the suggestion in progressing the way

    Thanks in Advance

    Comment by uday kumar | July 12, 2010 | Reply

  342. Hi Mohan,

    While recording the script, the names of the controls are truncated to 30 characters like “ctl00$ctl00$ctl00$MCGMainConte” for “ctl00$ctl00$ctl00$MCGMainContent”. In the object repository, I can change them to more than 30 characters. Due to this limitation I see control names as “ctl00$ctl00$ctl00$MCGMainConte_2″, “ctl00$ctl00$ctl00$MCGMainConte_3″, …

    I assume there is a parameter / setting restricting definig the length. Do you know how I can increasae the size of the control names or capture the full name of the controls.

    Thanks
    Sri

    Comment by Srini | July 13, 2010 | Reply

  343. Hi Mohan, I saw some good answers in you web site. They are very much helpful.

    Currently I am working on creating automated test scripts in QTP for couple of web sites. As I am starting from scratch, I will to build in the right way.

    The structure I have created is given below:

    DATA\
    EXECS\
    OBJREPLIBRARY\
    PARAM\
    SCRIPTLIBRARY\
    SCRIPTS\
    SCRIPT1
    SCRIPT2
    SCRIPT3

    The data files are which will be used to populate the data will be stored in the DATA directory. At some places, I may make direct database calls to get the data. Wherever required, I will be getting the data from the data bases.

    All the object repositories from the web pages are stored in the OBJREPLIBRARY directory. I will be capturing all controls for each page / tab in the object repositories. If there are any new controls added in the web page, I will add them in the script (local repository) and update them on the related object repository.

    All functions will be stored in the SCRIPTSLIBRARY directory.

    I will be storing all batch jobs to run these test scripts in the EXECS directory.

    All the INI files for getting the parameters in to the script are stored in the PARAM directory. Using the common functions the values from the INI files will be populated in the script.

    All the test scripts are stored under the SCRIPTS directory.

    As there will be multiple releases, there will be lot of changes for each release and I want to increase the maintainability of the scripts.

    I am I in the right direction. Please let me know if I am doing something wrong or can this be done in a better way.

    Thanks
    Sri

    Comment by Srini | July 15, 2010 | Reply

  344. fso=createobject(“Scripting.FileSystemObject”) why we will use this command

    Comment by veda | July 19, 2010 | Reply

  345. Hi Mohan

    I was just searching for some codes for Excel when I came across QTP. Great Job!

    All I want to do is to comapare values in two excel sheets. I have one excel sheet which gives names and values and another sheet which also gives names and values. There are 8000 entries in one file and 840 entries in the second file. out of this 727 entries are same in both files. I want to extract information of only these 727 entries along with their values. Can you please help me?

    And also can you tell me how I should run it because I have no clue how writing codes in excel works but this is very important part of my project.

    Thanks!!

    Comment by Aparna | July 28, 2010 | Reply

  346. Hi Mohan,

    I want to know whether are the below things possible..

    we have automated sanity tests for our application, so daily when new build comes we run those scripts, now i wanted to ask can we link that particular DB with QTP so that if a new load has come it only picks of sanity tests which are necessary to be performed for the new patches and starts running them, i know it sounds weird… but can this be done??

    Comment by Raghu | August 5, 2010 | Reply

  347. Hi Mohan,
    I want to know how to export a runtime data sheet to QC excel attachment.could you please help me reg this ASAP.
    Thanks in advance

    Comment by chandrika | August 9, 2010 | Reply

  348. hi mohan, how are you?

    If its possible can i know using descriptive programming, how to write the code for tab selection in windows application. I tried in many websites but not able to get the solution.

    When QTP is open i have only ActiveX, VB and Web are active.

    Please help me with this.

    Thanks,

    Murthy

    Comment by Murthy | August 10, 2010 | Reply

  349. I NEED YOUR HELP CAN YOU PLEASE SEND ME YOUR COTACT DETAILS

    Comment by krishna | August 19, 2010 | Reply

  350. hi I NEED YOUR HELP CAN YOU PLEASE SEND ME YOUR CONTACT DETAILS

    Comment by krishna | August 19, 2010 | Reply

  351. Hi,
    I am new in QTP.
    While working with Oracle Applications,I am facing a problem in the script.I have to select a value from Oraclelistofvalues.I have the code as shown below
    dtStrReceivingorg=Datatable.Value(“Receivingorg”,”ABC”)
    WareHouse2=Datatable.value(“Warehouse”,”ABC”)
    OracleFormWindow(“Navigator”).SelectMenu “File->Switch Responsibility…”
    OracleListOfValues(“Responsibilities”).Find Warehouse2
    OracleListOfValues(“Responsibilities”).Select dtStrReceivingorg

    When I run this,QTP is giving the following error

    Cannot identify the specified item of the Responsibilities object. Confirm that the specified item is included in the object’s item collection.

    Please suggest me a solution for this.This is very urgent.

    Thanks in Advance,
    Paimala.

    Comment by Parimala Mudimela | August 20, 2010 | Reply

  352. Hi Mohan,

    Can you give example to how to create toolkit support for dropdown in web addin. Qtp is recognizing it as webelement and has also recognizing all options in dropdown as individual webelements.

    Thanks,
    p

    Comment by p | August 21, 2010 | Reply

  353. Hi Mohan,
    i am facing an issue during capturing the screen shot of word document using QTP. below are the steps.
    1.open word document
    2.enter content in that word doc
    3.capture the screen shot
    4.rum mspaint
    5.paste the screen shot
    6. save it in BMP format.
    i am not able to print the screen and paste it.

    Comment by Nataraja.cv | August 27, 2010 | Reply

  354. Hi Mohan,

    I have created key driven frame work but only 1 test data working as of now .Could you pls help me How to call 2 test data in a framework ??

    Thanks,
    Manesh

    Comment by Manesh | August 29, 2010 | Reply

  355. Hi Mohan Ji
    Really you are doing a great job.
    Please keep in touch with me whenever i get doubt.

    Thank you,
    G.RamaKrishna

    Comment by G.RamaKrishna | August 30, 2010 | Reply

  356. One of my application is using WPF controls. When i do a spy on any of the WPF control, the spy identifies each object uniquely based on class name (for eg. Wpfcheckbox, Wpfeditor, Wpfbutton) but when the same object is been added to repository nothing appears in the Object Repository. It does not get added to the Object Repository although one can spy on it.

    While doing a record also none of the object gets added to the repository and no code gets generated on performing actions on any of the WPF control

    please suggest me

    Comment by sanjay | September 1, 2010 | Reply

  357. Hi Mohan,
    Firstly an excellent blog. I have a question here:

    1. Copying data from an application onto a clipboard
    2. Pasting it in an excel(2002) sheet
    3. Saving it.

    The date format changes from dd/mm/yyyy to mm/dd/yyyy automatically. But manually works fine.

    Comment by Vik | September 9, 2010 | Reply

  358. Hi Mohan,

    Is it possible to automate Quality Center?
    If so Pl let me know how.

    Note : I tried using Virtual Objects but didnt work.

    Thanks,Srinath

    Comment by Srinath | September 14, 2010 | Reply

  359. Hi Mohan,

    I need someone who can do the automated testing of a website.
    I was wondering would be interested to do the job?

    If interested then call me at +91-9935029703.

    Regards
    Siddhartha

    Comment by Siddhartha Kapoor | September 15, 2010 | Reply

  360. Hi Mohan,

    I have question that.I created a standered check point on page and passed the value to check in database and it is working fine.But i have to create a check point that should be a generic one where i can use that function or sub on any pages like different pages displays the newly created ID.so i have to capture that ID and verify it in DB.Could you please replay me back or any one who knows about it please feel free to contact me.

    Thank You
    Jagath

    Comment by Jagath | September 17, 2010 | Reply

  361. here i am recodring or object respotory to find dropdown lists here iam getting error like “”—Confirm that the specified item is included in the object’s item collection.—” while i am passing values from notepad to dropdown list i am getting error if any one known plxz send me solution in mail or here

    Comment by bharat | September 23, 2010 | Reply

  362. Hi Mohan,

    I have two questions in QTP. Please help to resolve my problem.

    1. By QTP, I opened MS-DOS Command prompt, Typed Calc, but im unable to click the Enter Key button through QTP? I tried with SendKey Method, but still i am unable to resolve it?
    Here is query i used;
    SystemUtil.Run “cmd.exe”,””,”C:\Documents and Settings\vikram”,”open”
    Window(“micclass:=Window”,”nativeclass:=ConsoleWindowClass”,”index:=0″).Type “Calc”
    Window.SendKey “ENTER”

    2. In QTP can we run a xml file through QTP in the command prompt. Is it possible in QTP?

    Thanks.

    Comment by Vikram | October 4, 2010 | Reply

  363. Hi,

    I need a help over here please. I am tring to retrieve the data from Excel to specific nodes of XML. Since my source XML do have same tags/elements, I am not able map the specic values.

    Example:

    1967-08-13

    String
    String

    String

    1.12

    String

    1967-08-13

    String
    String

    String

    1.12

    String

    /dis:Lossess/dis:OccuranceDate -> The node mentioned in Excel to pull the value, when it read and complete the entire block , the next set of values from the excel is overwriting the first one, where I couldn’t create two blocks while running the test. Can anybody help me out please?

    Comment by Saravanan Rajan | October 8, 2010 | Reply

  364. Subscribe

    Comment by Khaja | October 18, 2010 | Reply

  365. I have a excel sheet, when we try to open it popups a dialog box. We have to enter user ID and Password and click on ‘Next’ button. How to automate this using QTP.

    Please help me resolve this issue.

    Comment by selvam | October 25, 2010 | Reply

  366. Hi Jen Bachelder

    Try to use childobjects for the browser. (i.e, IE which your are recording)You will get to see all the child objects listed and you can pick which object you want to work on.

    Comment by Arun | November 12, 2010 | Reply

  367. Hi Mark Karl

    Please follow these steps before you record your application – flex / flash objects

    # Flex application, you must deploy the application and its supporting files to a location that is accessible by QTP. These files include:

    * Application SWF file
    * HTML wrapper and wrapper files (the wrapper files can include SWF files, JavaScript
    files, and other files)
    * RSL SWC files
    * Module SWF files
    * Helper files such as theme SWC files, style SWF files, and image, video, and sound files.

    # You may deploy the Flex application and HTML wrapper file to any location on your HTTP server. You must be able to access this location from QTP.

    Comment by Arun | November 12, 2010 | Reply

  368. i have created a XML file from SQL 2000
    but the elemnets of teh fie are not structreud, formated as per the given format

    how do i format or arrange the elements as needed

    Comment by SVK | November 19, 2010 | Reply

  369. Hi Mohan,

    I have just diacovered your website and found that, you are a great guy in QTP. I am learning QTP myself and I would like to know the best way to use your scripts to quickly learn QTP.

    Thanks

    Comment by D Arrey | November 22, 2010 | Reply

  370. Hi Mohan,

    I m trying to get cell value of javatable, but the values is always fields.ATable$InnerTable, its is an javaobject and is casted to javatable during runtime I guess. when I try to record the table name varies bases on the cell selection and I wanted to capture the cell value, i m not able to as it refers fields.ATable$InnerTable. I dont find any properties as such. apparth from classpath, tagname and path.. which has fields.ATable$InnerTable as value. Pls suggest a way for this problem. I guess the application is refereing 3rd party tool, in that case how to identify the value of the table.

    Comment by priya | December 2, 2010 | Reply

  371. Nice site Mohan

    Comment by madhu | December 5, 2010 | Reply

  372. nice site

    Comment by madhu | December 5, 2010 | Reply

  373. Can you explain how the Property Value pairs are used in Descriptive programming?

    Comment by Oceans | December 8, 2010 | Reply

  374. Hi Mohan

    i have one dought..please help on that..
    is there any code to find index no of the object if yes please provide me

    Comment by madhu | December 9, 2010 | Reply

  375. Hi, Mohan
    Can’t I execute the QTP9.2 scripts in QTP10.0 directly by providing the path??

    Thanks

    Comment by Ashwini | December 14, 2010 | Reply

  376. Hi Mohan,
    I am using QTP 10, on object spy over an windows based application object, the application freezes and the system hangs.I need to kill the application process and start over again everytime. Whereas the QTP spy works well with other applications objects built on other tech.
    Could you please let me know how to overcome this issue.

    Comment by albert | December 14, 2010 | Reply

  377. Hi,

    I am new for QTP. I installed qtp 9.2, while opening the sample application, shows error message “Data Source name not found and no default driver specified”.How to fix the above error, and how to create mdb connection to run the application.

    Awaiting for good reply.

    Regars

    YVS LAXMAN

    Comment by YVS LAXMAN | December 17, 2010 | Reply

  378. This is one of the best designed blogs I have ever seen. Im coming here all the time.

    Comment by Susan Merget | December 18, 2010 | Reply

  379. Hi,

    I need help in executing VBScript thru Internet Explorer to:
    1. List all Services on a Remote Machine
    2. Stop and Start Services

    Also, please let me know if this works on both win2k3 and win2k8?

    Thanks in advance.

    Comment by Anthony | January 3, 2011 | Reply

  380. Hey,

    I have installed QTP 9.2 on Windows VISTA with IE7.
    When I select the google browser through object identifier, it recognized as Windows object.

    please provide the solution for this.

    Comment by Velan | January 27, 2011 | Reply

  381. Hai Mohan…
    Thanks for providing the useful information regarding VB Scripting.

    Comment by Anil | January 31, 2011 | Reply

  382. Good Work Dude. Worth going through your blog.

    Comment by Neelima | March 24, 2011 | Reply

  383. Hi mohan
    this is tanuj,i m new in QTP field.i need ur help.actually my Query is:- i want to get the number from web application and store any variable that number r change for every process.like a “score” of users.plz give me suggestion & if possible so tell script also.

    Comment by tanuj | March 25, 2011 | Reply

  384. Hi Mohan,

    Iam just started leaning QTP, but could not understand how to implement it practically.
    can you help me out.

    Comment by swapna | March 29, 2011 | Reply

  385. Hi Mohan,

    I am new to automation Testing.
    Could you please advice me the Process which i need to follow and practice to learn QTP in 1 month.

    Is there any sample codes please send me.

    Thanks in Advance.

    Thanks & Regards,
    Nagaraju Belli

    Comment by Nagaraju Belli | April 23, 2011 | Reply

  386. Hi,

    I have main Application browser.Int this browser, new another browser is opened when clicked webelement in manin Application browser.I want click the webbutton in new browser.

    But here problem is During run time,new browser object is identifying the Main Application browser.So unable to click the button in new browser.

    Please reply how to solve this problem.this is urgent.Thanks in advance.

    Thanks,
    Bhuvan

    Comment by bhuvan | April 28, 2011 | Reply

  387. hi
    i am new to QTP and i have some assignments in the same.In our project they are using a common function called “CaptureToWord” for consolidating the screenshots in a word document with the proper test case details. in that script it includes a blank page in the last. i dono avoid that(modifying the script). if you wish send a test mail to sathiya_Arunachalam@syntelinc.com so that ill send you the script. please help me in this regard

    Comment by Sathiya | April 29, 2011 | Reply

  388. hi Mohan
    will please explain the following code?

    Function CaptureToWord()
    sTscenarioPath = GetData(“ScreenshotPath”)&Environment(“TestName”)
    sWordFileName= sTscenarioPath&”\”&Environment(“TestName”)&”.doc”
    Dim sFileCapture()
    sFileCaptureLen = -1
    Const END_OF_DOC = 6
    Set fileSys = CreateObject(“Scripting.FileSystemObject”)
    Set sSubFiles=fileSys.GetFolder(sTscenarioPath).Files
    If sSubFiles.Count = 0 Then
    Set fileSys = Nothing
    Set sSubFiles = Nothing
    Exit Function
    End If
    Dim aResponsibility()
    Datatable.AddSheet(Environment(“TestName”))
    Datatable.ImportSheet GetData(“FilePath”),Environment(“TestName”),Environment(“TestName”)
    iRowCount =datatable.GetSheet(Environment(“TestName”)).GetRowCount

    k = 0
    For iCountNo = 1 to iRowCount

    Datatable.GetSheet(Environment(“TestName”)).SetCurrentRow(iCountNo)

    If trim(Datatable(“Testcase_Id”,Environment(“TestName”))) “” Then
    ReDim Preserve aResponsibility(k)
    ReDim Preserve aTCName(k)
    aResponsibility(k) = Trim(Datatable(“Responsibility”,Environment(“TestName”)))
    aTCName(k) = Trim(Datatable(“TestCase_Name”,Environment(“TestName”)))
    k = k+1
    End If
    Datatable.GetSheet(Environment(“TestName”)).SetCurrentRow(iCountNo)
    If trim(Datatable(“Testcase_Id”,Environment(“TestName”))) = “” Then
    Exit For
    End If
    Next

    Set obj_MSWord = CreateObject(“Word.Application”)
    Set objDoc = obj_MSWord.Documents.Add()
    For Each iSubFiles in sSubFiles
    If Right(iSubFiles.Name,4) = “.png” Or Right(iSubFiles.Name,4) = “.PNG” Then
    ReDim Preserve sFileCapture (sFileCaptureLen+1)
    sFileCapture(UBound(sFileCapture)) = iSubFiles & fileSys.GetFile(iSubFiles).DateLastModified
    sFileCaptureLen = sFileCaptureLen +1
    End If
    Next
    For i = LBound(sFileCapture) To UBound(sFileCapture)-1
    min = i
    For j = (i + 1) to UBound(sFileCapture)
    if StrComp(Right(sFileCapture(j),20), Right(sFileCapture(min),20))=-1 Then
    min = j
    End If
    Next
    Temp = sFileCapture(i)
    sFileCapture(i) = sFileCapture(min)
    sFileCapture(min) = Temp
    Next

    For i = LBound(sFileCapture) To UBound(sFileCapture)
    strLWordFile = Split(sFileCapture(i),”\”)
    strDesc = Split(strLWordFile(4),”.png”)
    sLWordFile = strLWordFile(0) &”\” & strLWordFile(1) & “\” & strLWordFile(2) & “\” & strLWordFile(3) & “\” & strDesc(0) & “.png”
    ‘MsgBox strDesc(0)
    TC = Split(strDesc(0),”_TC”)
    iTC = GetNumberFromString(TC(1),0)
    tChar = Len(TC(1))
    iChar = Len(iTC)
    sActivity = Right(TC(1),tChar-iChar)
    eActivity = Replace(sActivity,”_”,” “)
    Set objSelection = obj_MSWord.Selection
    ‘objSelection.TypeText “Table”&i

    objSelection.TypeParagraph()
    Set objRange = objSelection.Range
    objDoc.Tables.Add objRange, 5, 2
    Set objTable = objDoc.Tables(i)
    objTable.Range.Font.Size = 15
    objTable.Range.Style = “Table Contemporary”
    objTable.Cell(1, 1).Range.Text = “Scenario Id”
    objTable.Cell(2, 1).Range.Text = “Responsibility”
    objTable.Cell(3, 1).Range.Text = “Test Case Id”
    objTable.Cell(4, 1).Range.Text = “Test Case Name”
    objTable.Cell(5, 1).Range.Text = “Screen/Activity/Verification”
    objTable.Cell(1, 2).Range.Text = Environment(“TestName”)
    objTable.Cell(2, 2).Range.Text = aResponsibility(iTC-1)
    objTable.Cell(3, 2).Range.Text = “TC”&iTC
    objTable.Cell(4, 2).Range.Text = aTCName(iTC-1)
    objTable.Cell(5, 2).Range.Text = eActivity
    objSelection.EndKey END_OF_DOC
    objSelection.TypeText ” ”
    Set objTable = Nothing
    Set objRange = Nothing
    Set objSelection = Nothing

    ‘obj_MSWord.Selection.TypeText strDesc(0) &” ”
    obj_MSWord.Application.Selection.InlineShapes.AddPicture(sLWordFile)
    obj_MSWord.Selection.InsertBreak(1)

    Next
    obj_MSWord.ActiveDocument.SaveAs(sWordFileName)
    obj_MSWord.ActiveDocument.Close()
    obj_MSWord.Quit
    Set obj_MSWord = Nothing
    Set objDoc = Nothing
    Set sSubFiles = Nothing
    Set fileSys = Nothing
    End Function

    Comment by Sathiya | April 29, 2011 | Reply

  389. Hi Mohan,
    I need a help.Can you please confirm me could i use QTP for IVR testing.If so how and explain me in detail.

    Comment by Asha | May 7, 2011 | Reply

  390. Hi Mohan,

    We are automating java based application in thr some of controls are identifying as winobj..is thr any possible to convert winobject(as it is identifying currently) to Activex Control.It will be very very helpful us if yu come with some soln :)

    Comment by dhesihan | May 19, 2011 | Reply

  391. We are automating java based application in thr some of controls are identifying as winobj..is thr any possible to convert winobject to Activex even we tried enable the Activex control but still it is identifying as winobj.It will be very very helpful us if yu come with some soln !

    Thanks

    Comment by dhesihan | May 19, 2011 | Reply

  392. Hi,
    Have u installed Java Addin.I think with java Addin it should give any problem.

    Comment by upendra | May 19, 2011 | Reply

    • Yes we tried installing java addin still its identifying as winobj.

      Comment by dhesihan | May 30, 2011 | Reply

  393. I am using QTP 10.0.I have a new requirement to auttomate applciations built in VC++ with MFC. Can you please let me know the right addin to identify VC++ objects .

    I tried .net and VB addin but the objects were not identified.

    Comment by Bharani M | May 24, 2011 | Reply

  394. I am using QTP 10.0.I have a new requirement to auttomate applciations built in VC++ with MFC. Can you please let me know the right addin to identify VC++ objects .

    I tried .net and VB addin but the objects were not identified.Please suggects me the right QTP addin

    Comment by Bharani M | May 24, 2011 | Reply

  395. Hi Mohan,

    I am very new to testing. I have to automate UI testing using QTP.I have very limited knowedge on QTP not practical.

    Can you plesse suggest how do i go with QTP and how can i make it run automatically everyday after my build?

    Comment by Anu | May 26, 2011 | Reply

  396. hi upendra,

    Yes we tried installing java addin still its identifying as winobj.

    Comment by dhesihan | May 30, 2011 | Reply

  397. hi
    iam bindu i have a doubts on how to open a qtp new test through comand prompt

    Comment by T.himabindu | June 2, 2011 | Reply

  398. Hi mohan,
    currently, i’m working on Manual Testing. i dont have any idea on “automation testing” as well as “coding” also.
    Now, i wanted to learn QTP. Can i go for this option or not?
    PLZ suggest me..

    Thanks in advance.

    Comment by sowjanya | June 3, 2011 | Reply

  399. Hi,
    Try to launch QTP and Browser as administrator then you will identify the objects properly

    ashok

    Comment by ashok | June 4, 2011 | Reply

  400. Hi Mohan Anna,

    I would like speak to you. I am in USA.

    I need your help anna, Please give your contact info.

    Please give your contact no.

    My email address: skgrandhi@hotmail.com

    Comment by sarat | June 7, 2011 | Reply

  401. Hi Mohan,

    I have no idea how to get attribute and value of OpenOffice XML Form file (.odt,.sxw)

    Dim oSM, oDesk, arg()
    Set oSM = CreateObject(“com.sun.star.ServiceManager”)
    Set oDesk = oSM.createInstance(“com.sun.star.frame.Desktop”)
    Set oDoc = oDesk.loadComponentFromURL(“file:///C:/test.odt”, “_blank”, 0, arg)
    …..
    ‘ I cannot find any method to get attribute element name and value, so do you have any idea for this

    Set oDesk = Nothing
    Set oSM = Nothing

    Thank in advice

    Comment by Manat | June 10, 2011 | Reply

  402. How to write the scripts in project using QTP. I am learning QTP .
    How to execute the scripts in “Batch Mode”

    Please give me solution my question,

    Comment by sarath | June 10, 2011 | Reply

  403. Hi,

    I am trying to convert excel sheet data to PDF using QTP, but problem is that excel sheet having font face as Arial but after coverting to PDF font is automatically converted to callibri. so why is going to happen?

    Comment by Ankur | June 13, 2011 | Reply

  404. Hey Mohan,
    Great work ….
    I am facing a problem … I need to read a pdf file by QTP … just want to read values of some label and then validate it with DB … can you please tell me how can we read a PDF file ?

    Comment by tarun arora | June 16, 2011 | Reply

  405. How to write the scripts in qtp with project and how to excute the scripts in bath mode? can you give me idea for the questions

    Comment by sarath | June 18, 2011 | Reply

  406. Hi,

    I am jst started Learning QTP . Kindly help me in below task

    Task –
    1. Runtime Add sheet to databale
    2. Add colum to tht sheet. & add value to tht column
    3. Again add one more row under tht column

    code –

    v1 = “Pritesh”
    var = datatable.AddSheet(“Friends”).AddParameter (“Name”,”Miind”)
    datatable.Value(“Name”,3) = v1
    datatable.SetNextRow ‘ will move cursur of global sheet to next line but we want to move cursur of Runtime added sheet
    msgbox var ‘ added msgbox to see runtime added sheet

    Comment by milind | June 18, 2011 | Reply

  407. How can compare two different database by QTP?
    Source: SQL
    Destination: DB2

    Comment by kk | June 24, 2011 | Reply

  408. hi,kakarala
    really good effort….
    i think this is the best site for QTP scripting

    Comment by sunil | June 24, 2011 | Reply

  409. hello friends, please help me,…..
    i need code to write into excel using adobe connections qtp

    Comment by sunil | June 24, 2011 | Reply

  410. Hi Mohan,

    Great work and very great to see ur site…!

    I need a code where my requirement is like this.
    My QTP code opens an excel sheet from the HTML window.
    I need tho search the excel sheet whether a particular string is present in the excel sheet or not.

    Comment by Santhosh | July 13, 2011 | Reply

  411. How to export the Reporter.ReportEvent results to excel file

    Comment by lokesh | July 19, 2011 | Reply

  412. Hi Mohan
    I need to execute my entire framework through QC..Now i have written the driver script to execute my entire framework and storing results in XL file..But i want to store result in QC and to execute framework using QC..Plz tell me the steps send the required code for this..
    Thanks

    Comment by prem | August 8, 2011 | Reply

  413. Hi ,

    How to Save a File With a Different Name ?

    while saving it asking file name so, i need give file name manually.i need to vbscript code for to give new file name programmatic
    .
    I need vbscript code for qtp.

    Comment by shiva | August 8, 2011 | Reply

  414. hi, i’m using qtp 11.0 So far when i was reading content it used to return a value. In one version of the software it returns null. i.e, in previous versions, getitemscount used to return a not null value. Now, it does not return any. the object is recognized though. Some internal property would’ve changed. But i’m unable to figure out what. plz help me out.

    Comment by vivek | August 8, 2011 | Reply

  415. Hi Mohan,

    In my system while checking the license, QTP is taking so much time.

    Due to that, all the scripts are failing while running the scripts through the driver.

    Is there any solution for that ?

    Comment by Aditya Ranjan Patra | August 11, 2011 | Reply

  416. Hello Mohan,
    I m Priya.. I m new to Automation. I had a problem while comparing 2 Excel Files. I have same data in both of the sheets. I used your link http://quicktestprofessional.wordpress.com/2008/02/27/compare-2-excel-sheets-cell-by-cell/ and I tried your code. As per the Script, If the Changes made in any one of the sheets, the cell should be changed to red color. But the cell color is not getting changed even though the data are different in 2 excel Files.

    Comment by Priya | August 12, 2011 | Reply

  417. hi Mohan,

    I need your help to use QC OTA API to map the scripts of testplan to the requirements uploaded in requirement tab…

    Comment by koyeli | August 18, 2011 | Reply

  418. Hi Mohan,
    I want to learn basics of vbscripting used in qtp.Will you please suggest me some good books and websites to learn?Thank You.
    Regards,
    sv

    Comment by sindhujaa | August 24, 2011 | Reply

  419. Nice forum Mohan….hey I have one question. I am working on QTP 11 one of the javawindow based objects are not recognizing can you please give me some ideas on this… changed some environment variables also still no luck…thank you

    Reddy

    Comment by Reddy | August 25, 2011 | Reply

  420. hi mohan,
    can i have your phone number
    Thanks&regards
    D.Srinivas

    Comment by srinu | September 2, 2011 | Reply

  421. Hi Mohan,
    I need your help in QTP . I have so many reports which generates in different format (.html, XLS, PDF and CSV). I have to compare this reports each and summarize the report in XLS in the below way summarize.
    1) How many reports having conflict ##
    2) Report1 having conflicts ##
    3) Report2——-do——- ##

    Whenb I Click on the Num ## It should go to specific report

    Comment by Kotesh | September 2, 2011 | Reply

  422. Hi Mohan,

    Scenario: how to run multiple QTP scripts from QC on different machines, say for example 100 script in QC test lab, to run on 5 machines, each machine having 20 scripts, while running all at a time from QC, if one of the machine’s h/w got crashed, so those scripts should automatically distribute or run on any available machine.

    any idea plz?

    –thanks,
    Sam

    Comment by Shyam | September 3, 2011 | Reply

  423. Hi all,

    I need a small help to implement the following scenario in qtp

    when we register a new user using “Create account” link, password will be generated by the application and sends the user name and system generated password to the email which was given while registration.

    I need to open an email and retrieves the password from email and should login with the user name and password that was given in the email using qtp?

    Can anyone help me “how to open an email and retrieves the password from email?”

    Comment by Ranjith | September 14, 2011 | Reply

  424. Hi Mohan,

    Greate effort. i learned a lot from ur site.Could u explain me BPT framework. how to fetch the actions created in QTP to QC under components. how to create application area. My mail is sureshgottipati@ymail.com.

    Comment by suresh | September 20, 2011 | Reply

  425. Hi Mohan,

    I need to write a script which pulls the result from QC result files of automation script and need to open the webmail and create a tabular column and paste the fetched result in tabular column.
    Can you please help me on this. For example if I have executed 10 automation scripts from qc then I need to fetch the result for all those 10 scripts whether it is pass or fail.

    Comment by Partha | September 26, 2011 | Reply

  426. HI MOHAN

    I AM VERY NEW IN TABLE, HOW I CAN SIGN OUT FRON MY YAHOO EMAIL?

    Comment by gaby | September 26, 2011 | Reply

  427. Hi Mohan,

    I have to upload an xml file in my SAP application.
    While recording below code is getting generated.
    SAPGuiSession(“Session”).SAPGuiWindow(“lane and rate Upload”).SAPGUIEdit(“Upload File (with path)”).Set “P:\Windows\Desktop\rates.xml”

    but during execution I get Bad length error. I have also tried with creating xml object but couldn’t succeed. Can you help me to resolve this issue?

    Comment by Parag Trivedi | October 4, 2011 | Reply

  428. Hello Mohan,
    I am automating an Excel application using QTP11.
    How to realize selecting menu and items of Excel window in QTP?
    Upon spying, the entire menu is recognized as WinObject.
    Please help.

    Comment by Prashanth Pai | October 4, 2011 | Reply

  429. hello can u tell me how to copy only numbers from one text file to another by using vbscript in qtp
    pls urgent……ihv done it but it shown an error i.e objects not a collection

    Comment by kiran patra | October 4, 2011 | Reply

  430. Hi Mohan,

    In QTP we have to use a SQL query which is to update the date for a particular test case which is in test lab of Quality center.

    Can u please help how to use that query.

    Comment by vamsikrishna | October 7, 2011 | Reply

  431. Hi,
    Kindly suggest how to change the browser as mozilla from IE after selecting web in recor and run settings.

    Comment by Rexiline | October 8, 2011 | Reply

  432. Hi Mohan,

    Need some help.

    I am working with OTA in QC. I need to run a script from a particular test set in QC and not the default test set and also finally need to send the run results to the responsible people.Also wanted to schedule this run.

    Please help me with the same.

    Contact :- nishamr4@gmail.com

    Comment by Nisha Radha | October 17, 2011 | Reply

  433. Hi Mohan,

    Please send me the solution to my email id : nisha.radha@tcs.com

    Thanks in advance!

    Comment by Nisha Radha | October 17, 2011 | Reply

  434. wbook.Save (“E:\123.xls”)
    a excel object.

    when this line executes , Excel is prompting file exists
    How do I save….
    I am a beginner..pls help

    Comment by SR | October 19, 2011 | Reply

  435. HI Mohan!

    i have a ? 4 u. i used the sendkeys for pasting the content in another application using the code Clipboard.Clear()
    Clipboard.SetText(“uday”);
    SendKeys.Send(“%{TAB}”);
    SendKeys.Send(“^{v}”);
    but when i was running the application it was pasting more than once especially in mozilla.can u suggest me to do something.it was veryyyyyyy urgent plzzzzzz! help me
    waiting 4 ur reply

    Comment by sagarika | October 27, 2011 | Reply

  436. Hi Mohan,

    Your site is very informative , i would like to thank you for sharing the knowledge, its really helpful.
    My question is , i have an attachment stored in a defect under defect module.

    Is there any way i can download the attachment using QC API or QTP.

    First i thought of getting access to QC DB , then query the table to get the attachment, but getting access to the QC database is not going to happen now.

    Please help

    Thank You

    Comment by sam | November 1, 2011 | Reply

  437. Hi Mohan,

    IS possible to compare the 2 websites in QTP?

    The URL will be different, but inside the content should be same(images, links, tabs ,text and buttons..etc..

    if yes, can you plz tell me how to compare, as I have to compare 72 links. For each and every link I have Production and QA server link.

    Comment by Jyothsna | November 4, 2011 | Reply

  438. hi mohan,
    i want to know all the vbscript methods, pls do let me knw

    Comment by praneetha | November 7, 2011 | Reply

  439. Hi Mohan,

    I am having some problem reg. running a test which is stored in QC using QTP AOM.
    Here, after the run, using RunResultObject , I am able to save the test results under particular test set in QC. But for the second run, it is over writing the existing test instance.

    My requirement is to write the test result under second test instance using AOM.

    Please help.
    Thanks,
    Nisha

    Comment by Nisha M R | November 14, 2011 | Reply

  440. I have installed the License key for QTP…Till yesterday I was able to use it.But today morning when I try to Open It is showing a message showing install License key….plz help me in overcmg ths issue

    Comment by priya | November 16, 2011 | Reply

  441. Hi,
    I am working on Silverlight Component DataGrid and Flexi Grid. Qtp not able to identify Grid object and inner objects. Can any one help me regarding this issue.

    Comment by surya | November 17, 2011 | Reply

  442. Hi Mohan,

    I need a code for Saving a Excel file in different format like .ods (OpenDocument SpreadSheet)

    Please do reply as early as possible.

    Thank you,
    Uma
    Awaiting for your Reply..!!!!

    Comment by Uma H P | November 18, 2011 | Reply

  443. Yet, as I read the report,…

    I found the actions of an unnamed 28 year old graduate assistant very wrong, but sympathetic. Further, I found the actions of head coach Joe Paterno grossly wrong, but somehow reasonable. Both men, and many others, deserve whatever ramifications come t…

    Trackback by control de vehiculos software | November 26, 2011 | Reply

  444. hi , please give me suggestion how to save richtextbox data in xml file in windows application .net editor.

    Comment by deepti singh | November 26, 2011 | Reply

  445. Excellent website. Plenty of helpful information here. I’m sending it to some friends ans also sharing in delicious. And of course, thanks on your effort!

    Comment by bengali dating | November 27, 2011 | Reply

  446. You can certainly see your enthusiasm in the paintings you write. The arena hopes for even more passionate writers such as you who aren’t afraid to mention how they believe. Always follow your heart.

    Comment by hindi date | November 27, 2011 | Reply

  447. Heya i am for the first time here. I found this board and I in finding It truly helpful & it helped me out a lot. I am hoping to present something again and help others like you aided me.

    Comment by adult rsvp | November 28, 2011 | Reply

  448. Magnificent website. Lots of useful info here. I am sending it to a few pals ans also sharing in delicious. And obviously, thank you to your sweat!

    Comment by dating | November 28, 2011 | Reply

  449. Hi there very cool web site!! Man .. Excellent .. Superb .. I will bookmark your web site and take the feeds also?I’m glad to seek out numerous helpful info here in the post, we need work out more strategies on this regard, thank you for sharing. . . . . .

    Comment by dating easy | November 28, 2011 | Reply

  450. I loved as much as you’ll receive carried out right here. The comic strip is tasteful, your authored subject matter stylish. nonetheless, you command get got an shakiness over that you want be turning in the following. sick definitely come more previously once more as precisely the same nearly a lot continuously inside case you shield this increase.

    Comment by SHEILAS | November 28, 2011 | Reply

  451. Hi Mohan,

    I would like to know how to copy a xml from a text box and save it in a notepad?

    Window(“Courtesy License”).Type micCtrlDwn + “a” + micCtrlUp

    Set Obj_Shell=CreateObject (“WScript.Shell”)
    Obj_Shell.SendKeys (“^c”)
    wait 3
    bActivate = Obj_Shell.AppActivate(“Notepad”)
    Do

    bActivate = Obj_Shell.AppActivate(“Notepad”)

    If Not bActivate Then

    bExec = Obj_Shell.Run(“notepad.exe”)

    If bExec = 0 Then Wait 1

    End If

    Loop Until bActivate
    Obj_Shell.SendKeys (“^v”)

    I tried using
    Window(“Notepad_1″).Activate
    wait 3
    Window(“Notepad_1″).WinMenu(“SystemMenu”).Select “File;Save Ctrl+S”
    Window(“Notepad_1″).Dialog(“Save As”).WinEdit(“File name:”).Set “x.txt”
    Window(“Notepad_1″).Dialog(“Save As”).WinButton(“Save”).Click

    and Descriptive Programming

    ‘Window(“text:=Untitled – Notepad”).Dialog(“regexpwndtitle:=Save As”).WinEdit(“nativeclass:=File name:”).Set “C:\SoapUI\4002242793_GetSharteowner.txt”.

    None of them is working.

    Comment by Maheish | December 1, 2011 | Reply

  452. hi,i ve column in grid view with status as heading ,it displays some status like,open,close etc
    when on mouse on mouse on this status we are dis
    plying some standard message ,
    Ex.on mouse on close—-message will txn closed,so how to check it is displaying correct message while on mouse

    Comment by vikram | December 9, 2011 | Reply

  453. HI Mohan,

    I have to update the date for a particular test case which is in Execution grid of test lab through Automation script..
    Can you please share the code.

    Comment by vamsi | December 11, 2011 | Reply

  454. I am a currently evaluating QTP 11 on my company’s Silverlight 4.0 browser application. I have encountered an issue where QTP does not recognize the popup elements within the Silverlight application,
    I used following addin-in
    > .Net
    > Visual Basic
    > Web
    > WPF
    > Silverlight

    Comment by Munna Sarfraz | December 15, 2011 | Reply

  455. Hi Mohan,

    when iam trying to recording qtp can be recognize the objects as WinObject.I already install All the required ADD-INS.could u plz tell me the solution what i have to do that.

    Comment by R VishnuVardhan Reddt | December 16, 2011 | Reply

  456. Hi Mohan,

    I have to select a blank value from the list of available options in SAPGuiCombo box. Could you let me know how to achieve it?

    Comment by Santosh | December 22, 2011 | Reply

  457. Hi Mohan,
    This is the excellent website.You have done the great job.I want the code for ” test data is in excel sheet and i have to pass the test data to the script from the excel in reverse order

    Comment by suresh | January 2, 2012 | Reply

  458. I am trying to subscribe to your site, but for some reason it keeps refusing my email.

    QA123QTP@Gmail.com

    looking forward to hearing from you.

    Comment by Emad | January 11, 2012 | Reply

  459. Hi,

    I have some issue with below code,

    Set Obj = Description.Create
    Obj(“micclass”).Value = “Browser”
    Set BrowserCollection = Desktop.ChildObjects(obj)
    For i = BrowserCollection.Count-1 To 0 Step -1
    If Instr(1,BrowserCollection(i).GetRoProperty(“Name”),”HP Quality Center”)= 0 Then
    BrowserCollection(i).Close
    Do while (Dialog(“text:=Windows Internet Explorer”).exist(0))
    Dialog(“text:=Windows Internet Explorer”).winbutton(“text:=OK”).Click
    Loop
    End If
    Next

    this code working fine,but its taking too much for execution.
    I debugged this code,i found slowness in this line Set BrowserCollection = Desktop.ChildObjects(obj)

    Please tell me some for this issue.
    Naga.

    Comment by Nagarathinam.T | January 12, 2012 | Reply

  460. hi mohan

    how can I write a excel result file in the “test instance properties” of the according test under “all runs” ?
    in the beginning of the quick test I define the “file system object” for copying the excel file
    then I define the excel file as a datatable to be imported during the test
    this excel file lies under attachment of the test in the “test lab”
    so everything’s fine in the beginning – the messagebox of the sfilepath shows the correct directory, where the excel lies during the test


    Set fso=createobject(“Scripting.FileSystemObject”)

    DataTable.Import “Book_Search.xls”
    m = DataTable.GlobalSheet.GetRowCount

    sFilePath = PathFinder.Locate (“Book_Search.xls”)
    ‘msgbox sFilePath

    so the test runs through the loops and the result excel file lies under the sfilepath -
    when the test is over the new actualized excel file lies in this directory (=sfilepath) – so far so good
    I finally copy it to c:\temp


    DataTable.Export “Book_Search.xls”
    ‘msgbox Reporter.RunStatus

    fso.CopyFile sFilePath, “C:\Temp\”,True

    but I wanna copy this excel file in the test instance properties. how ???

    can you help please

    Comment by sandeman | January 12, 2012 | Reply

  461. Hi Mohan,

    Can you tell us how to copy test plan from QC10 from 1 Domain/Project to another Domain/Project in ALM11 using OTA API using vbscript?

    Thanks,
    Another Tester

    Comment by Hafeez | January 14, 2012 | Reply

  462. Hi Mohan,

    I am trying to export .tsr file to xml using following code
    ObjReposUtil.ExportToXML “C:\SPAT\SP3DResources\Catalog\Maps\CTLGRPSTRY.tsr”,”C:\SPATLogs\CTLGRPSTRY.xml”

    I am getting
    ‘Permission denied’ error on running above line of code from qtp.

    I wrote this line of code in vbs file and able to run this from qtp with wshshell.run command

    But i want to export all the associated tsr files to xml at run time.

    So i need to pass inputs to that shell exporttoxml method(not hardcoded values in vbs file) . When i tried to pass aguments to vbs file and run the exporttoxml method as below
    Set oArgs = WScript.Arguments

    ObjReposUtil.ExportToXML oArgs(0),oArgs(1) & “\” & oargs(2) & “.xml”
    i am getting Permission denied error again.

    Comment by lakshmi | January 17, 2012 | Reply

  463. Hi Mohan,

    If I open the QTP10.0, it’s opening but I couldn’t open the existing files from my local and also I couldn’t save any files/tests into my local. So can u please help me for the same soon.

    Comment by Prakash | January 17, 2012 | Reply

  464. Hi Mohan,

    I have to automate Google Web Toolkit(GWT) application through QTP. I have installed GWT add – in to identify objects. Still QTP identifying every object as either web Edit or WebElement or Image like combo box also identifying as WebElement. Pls suggest me what to do?

    Comment by Sireesha | January 18, 2012 | Reply

  465. Hi, I want to capture the entire screen (active desktop) and copy that in word. Can you provide me the link or the code. Thanks.

    Comment by Meena | January 20, 2012 | Reply

  466. Hello Mohan,
    This is Excellent website&Good job,
    1)I have 10 rows and 10 cloumns in a web table. Can you write cide for
    clicking on 5 row?
    2)how to supress the unwanted windows while runtime?
    please let me know the ans these Questions

    Comment by Lakshman | January 23, 2012 | Reply

  467. i have a requirement to delete attachment at testset level in testlab module in qc.

    Comment by KA | February 3, 2012 | Reply

  468. Hi Mohan ,

    I am working on .Net application

    some times QTP is not identifying the objects properly which it identified them earlier.
    When i tried to spy the object it is identifying them correctly but i opened the script and tried to add those
    objects to Local Repository at that time it is not identifying the object properly.

    actually the object is Swflist but it is identifying it as Swfobject.

    I executed the script earlier then it worked fine now all of a sudden it is not identifying them and throwing error.

    Please do reply me as early as possible…..

    Waiting for your reply

    Thank you,

    Mamatha

    Comment by mamatha | February 5, 2012 | Reply

  469. hi recentlhy i started learning qtp.i installed qtp 11 on windows 7.in flight application i didn’t see the date of flight object when i added to object repository.is any thing missed while installing.plz help me

    Comment by latha | February 9, 2012 | Reply

  470. Is there any way to retrieve the Cell Address of a particular cell from a Run-Time DataTable in QTP?

    Comment by RGI | February 16, 2012 | Reply

  471. Hi mohan,
    I want to execute from excell could you pls send me code for that

    thanks
    Balaji

    Comment by Balaji | February 21, 2012 | Reply

  472. Sorry for above question i want excute scripts from excell sheet

    Comment by Balaji | February 21, 2012 | Reply

  473. Hi Mohan.
    can we write a function to verify that a singly linked list does not contain any circularity.
    what is meant by circularity of singly linked list.

    Comment by pradeep | February 23, 2012 | Reply

  474. Hi Mohan,

    I have been trying to install QTP 11.0 trial version software to a VMWare server but was unable to do so. I get an error message as:
    The following pre-requisite programs should be installed:
    1.Windows Installer 3.1
    2.Microsoft Visual C++
    3.Visual Studio Tools
    Can you suggest any resolution for this?

    Comment by Prachi | February 25, 2012 | Reply

  475. Hi Mohan,

    I have some problem with Quality Center (QC)., that is I am unable to generate scripts for QTP. Whereas I am able to generate scripts for LoadRunner and other tools. The main problem is I am unable to find that QTP as an option for generating script in QC.

    Is there any settings which I need to change in QTP to make sure that QC shows QTP as an option in script generation???

    Kindly help me.

    Comment by raghu | February 26, 2012 | Reply

  476. Hi Mohan

    Plz help me………….
    Can u tell me the folder structure of Automation framework and explain contents of each folder.
    Can u send me the Driver script and any other related to Framework.If it possible send me to my mail id.

    Thanks
    Tirumala

    Comment by Balakrishna | February 28, 2012 | Reply

  477. Hi mohan,
    Is there any path for “Silverlight Componentone FlexGrid”, While I am trying to Identify objects through ObjectSpy, every object(Individual cell,Link,Combobox etc….) identified as “SlvObject”. Is there any solution or work around/path, plz let me know.

    Comment by Surya | February 29, 2012 | Reply

  478. I have a requirement to validate values in Charts/Graphs in PDF. Could you please help me on below issues

    1. Can we compare two PDFs with Charts and Graphs?.
    2. Can we get text in Images in PDF?

    Comment by Ravi Reddy | March 4, 2012 | Reply

  479. Hi,

    Would like to know if there is a plug-in to handle Unigraphics application thru QTP.

    Comment by Vishwanath | March 7, 2012 | Reply

  480. Hi Mohan,

    Please read the below scenario:

    I’m planning to automate QC TestLab, using program I’m intrested to create replica of test plan folder structure in TestLab, later I need to associate “tests” with TestSets.

    Here is the code which can able to create Folder and TestSet in TestLab.

    ‘Note: This scripts creates “VIS_Regression” folder in TestLab and creates “VIS_Test” Test Set under that folder.

    set tdc = createobject(“TDApiOle80.TDConnection”)
    tdc.InitConnectionEx “http://vcdqcvebp1/qcbin”
    tdc.Login “vishnu”,”ABC1234″
    tdc.Connect “ASL”,”Insurance”

    Set TreeMgr = tdc.TreeManager
    Set testF = tdc.TestFactory
    Set labTreeMgr = tdc.TestSetTreeManager

    ‘————————————————————————————-
    ‘ Test Lab: It creates Folder and TestSet in Test Lab.
    ‘————————————————————————————-
    ‘ It Creates Folder in Test Lab.
    errmsg = “Lab node error”
    Dim tsFolder, tsFolderPath
    tsFolder =”VIS_Regression”
    tsFolderPath = “Root\”& tsFolder
    On Error Resume Next
    Set labFolder = labTreeMgr.NodeByPath(tsFolderPath)
    ‘ On Error GoTo LinkDefectsToEntitiesErr
    If labFolder Is Nothing Then
    Set labTreeRoot = labTreeMgr.Root
    Set labFolder = labTreeRoot.AddNode(tsFolder)
    labTreeRoot.Post
    msgbox “Folder Created in TestLab”
    Else
    Set labTreeRoot = labTreeMgr.Root
    Set labFolder = labTreeRoot.AddNode(tsFolder)
    labTreeRoot.Post
    msgbox “unable to create folder in test lab”
    End If
    ‘————————————————————————————-
    ‘ Create TestSet under the New Folder.
    errmsg = “Test set error”
    Dim tsName
    TestName = “VIS_Test”
    tsName = TestName
    Set testSetF = labFolder.TestSetFactory
    Set aFilter = testSetF.Filter
    aFilter.Filter(“CY_CYCLE”) = tsName
    Set lst = testSetF.NewList(aFilter.Text)
    If lst.Count = 0 Then
    Set TstSet = testSetF.AddItem(Null)
    TstSet.Field(“CY_CYCLE”) = tsName
    TstSet.Post
    Else
    Set TstSet = lst.Item(1)
    End If
    ‘*************************************************************************************
    ‘————————————————————————————-

    I’m finding problem in linking tests with TestSet.

    Kindly help me….

    Thanks
    Vishnu

    Comment by vishnu | March 14, 2012 | Reply

  481. Hi Mohan,

    Issue in clicking the link “continue to website” in security warning certificate.

    i used the below code:

    If Browser(“EXP”).Page(“Certificate Error: Navigation”).Link(“Continue to this website”).Exist(30) Then
    Set a=Description.Create()
    a(“micclass”).value=”Link”
    a(“html id”).value=”overridelink”
    Set b=Browser(“EXP: IPSDK: Price Book”).Page(“Certificate Error: Navigation”).ChildObjects(a)
    msgbox b.count
    b(0).Click
    End if

    But am getting the count as Zero only.. when i run this script in test file, it is working. But when i run in vbs, it is not working.. please help on this…

    Comment by Riya | March 22, 2012 | Reply

  482. Hi Mohan,

    I encounter with a problem with the childObjects command.
    On some pages that include many objects this command cause the qtp become “not responding” and after that I get empty list of childs.
    On another computer it does work.

    Is there a limit to number of objects on page ? Is it depend on computer strength ?

    Thanks

    Comment by Idan | March 28, 2012 | Reply

  483. hi mohan
    This is sumathi i worked with qpt 9.2 using webapplication.but what is the code for the java application

    Comment by sumathi | March 31, 2012 | Reply

  484. Hi Mohan, I am new to this blog. There is big XML file which has 20 nodes and again child nodes. Some of these node elements have integers, strings and decimals as their values. I need to validate that they are integers,strings,and decimals as per the requirement. How can i do this.Can you please help me.

    Comment by Meera | April 12, 2012 | Reply

  485. Hi Mohan,

    I am new to this blog and am new learner of QTP.
    can you send me how write the driver script and what is mean by automation framework

    Comment by suresh | April 13, 2012 | Reply

  486. Hi Mohan,

    I am a beginer of QTP. In qtp how can write the descriptive programme
    is their any way to learn descriptive progamming

    Comment by suresh | April 13, 2012 | Reply

  487. Hi Mohan,
    i am trying to automate a login screen where i enter user id, password and click on login button. I recorded the scripts. When i playback the script the appropriate browser opens, my login id is entered automatically and pwd is also entered automatically but gets cleared before my login button gets clicked and i get an error “Please enter password”. could you please help me to resolve this issue. Thanks in advance.

    Comment by Sudha | April 25, 2012 | Reply

  488. Hi mohan
    I have a requirement of saving my file in sharepoint with vbscript please help me in this

    Comment by suresh | April 26, 2012 | Reply

  489. Hello Mohan/ all,

    Delphi Addin : when I recorded the application using only Delphi add-in the Delphi got identified appropriately. But Im facing another issue now , i.e the recorded while reexecuting is throwing “Unspecified Error” at some places in the code.
    A sample recorded code is as follows:
    DelphiWindow(“DelphiWindow”).DelphiWindow(“DelphiWindow”).Type micDwn
    DelphiWindow(“DelphiWindow_2″).DelphiEditor(“DelphiEditor”).SetSelection 0,0,0,8
    DelphiWindow(“DelphiWindow_2″).DelphiObject(“DelphiObject”).Click 68,9
    DelphiWindow(“DelphiWindow”).DelphiWindow(“DelphiWindow”).DelphiObject(“DelphiObject”).Click 498,381
    Window(“Editor”).Type micDwn
    Can you please suggest a solution for this!
    My application is on Delphi5 where as Delphi add-in says its supports from Delphi 6.0 . Could this be the problem ?

    Can u please let me know any comments of yours on this…

    Devidas

    Comment by devidas | May 10, 2012 | Reply

  490. Dear Mohan,

    Really great to got this site on google search and i appreciate your efforts.

    I am new to QTP world need lot of help from you and got struck at middle of running one of the web based application.

    Getting error like …
    Can not identyfy the object “Close” (of class WebButton”).Verify that this Object’s properties match an object currently displayed in your application.

    What would be the solution for this query, greatly appreciated your replay.

    Best Regards,

    Comment by kranthi | May 14, 2012 | Reply

  491. Thanks for finally talking about >Mohan Kumar Kakarla Quick test professional <Loved it!

    Comment by dedicated dedicated | July 20, 2012 | Reply

  492. HI Mohan ,

    I need to get two columns result from the excel using adodb , Please find the code below and help me

    Set db = createobject(“ADODB.connection”)
    str = “Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\248881a.xls;Readonly=True”
    db.Open str
    If err.number0 Then
    print err.number
    End If
    query=”select SDID,vlanid from [data$] ”
    set rec=db.execute(query)

    msgbox rec.Fields(0).value

    i am unable to get the two columns

    executing the above code

    getting below error

    Too few parameters, expected 1

    Please guide me

    Comment by Kumar | August 15, 2012 | Reply

  493. [...] 2 Frum o bojovch umnch :: Pidat nov tma http://osaka-senior.net/cgi/j-off/joyful.cgi PaPa na BOARD Mohan Kumar Kakarla TheDeadpool.com • Login http://tardy.martine.free.fr/forum_c…id=73&titre=Re K i Z [...]

    Pingback by men's electric shaver reviews 2012 - Dhaka Mobile Bangladesh | September 16, 2012 | Reply

  494. This is the right web site for everyone who hopes to find
    out about this topic. You know a whole lot its almost hard to argue with you
    (not that I personally will need to…HaHa).
    You certainly put a new spin on a topic which has been discussed for ages.
    Excellent stuff, just great!

    Comment by free url redirection services | September 27, 2012 | Reply

  495. My partner and I stumbled over here coming from a different page and thought I might check things out.
    I like what I see so i am just following you. Look forward to exploring your web
    page again.

    Comment by Marilynn | October 12, 2012 | Reply

  496. Hi Mohan
    Am working with wpf treeview object am getting error like.Confirm that the specified item is included in the object’s item collection.

    I tried with childobjects nothing working to expand a node. or select a node.

    do you how to add a collection to that tree object during runtime

    Comment by venkatesh | October 16, 2012 | Reply

  497. I’ve been exploring for a little for any high quality articles or weblog posts on this kind of house . Exploring in Yahoo I finally stumbled upon this website. Reading this info So i am glad to convey that I have a very excellent uncanny feeling I found out just what I needed. I most for sure will make certain to do not fail to remember this site and provides it a look on a continuing basis.

    Comment by perfumetemptation.com | November 4, 2012 | Reply

  498. Hello, i read your blog occasionally and i own a similar one and i was just curious if you get a lot
    of spam feedback? If so how do you stop it, any plugin or
    anything you can suggest? I get so much lately it’s driving me mad so any support is very much appreciated.

    Comment by monthly seo plan | November 17, 2012 | Reply

  499. Hi all Qtp guys,

    It’s a very wonderful and informative site for all QTP users, Thanks all for sharing your knowledge.

    I wana ask you guys about my current script which has in one page there are 10 Requisition number in radiogroup Button and i’m doing datatable parameterization for 10 iteration and selecting all those

    10 RadioButtonRequisition Number. But is it possible to write the Requisition number back to Excel sheet from these 10 Iterations. I can export the whole datatable after test. But I wana write back to Exel the requisition nUmber with each Datatable iteration for all 10 radio button Reuisition numbers.

    Please let me know or if you have any standard frameowork for this kind of situation.

    Thanks a lot agian.

    Comment by Saad Chowdhury | November 17, 2012 | Reply

  500. Hello my family member! I wish to say that this article is amazing, great
    written and include approximately all vital infos.
    I’d like to look more posts like this .

    Comment by phone selling | November 24, 2012 | Reply

  501. HI Mohan…I need your help in one the following areas:

    (1) Please suggest “How I can handle unwanted pop-up error messages which will get displayed during a test run”?
    (2) How to handle the application when it goes down during a test run?
    (3) If the focus gets removed from VPC, then my appln stops recognizing objects. Can you please help me in resolving this issue.

    Comment by Dipti Mittal | December 6, 2012 | Reply

  502. Hi Mohan:

    QTP was working fine two months back, recently QTP is not able to recognize any objects in web.

    Can you please let me know how to solve this issue

    Abdul.

    Comment by abduljaved | January 13, 2013 | Reply

  503. It’s going to be end of mine day, but before end I am reading this great piece of writing to increase my knowledge.

    Comment by prescription glasses for kids | January 13, 2013 | Reply

  504. whoah this blog is excellent i love studying your posts.

    Keep up the great work! You know, a lot of individuals are searching
    around for this information, you can help them greatly.

    Comment by Cornell | January 30, 2013 | Reply

  505. Hi,

    Thanks for sharing so much of useful information.

    I am stuck in 1 point.. where i have a read the data of 1 particular cell in excel and create the checkboxes at runtime depending on the count of rows in that particluar col..

    I am done with reading the data from excel but stuck at creating the checkboxes at the runtime on a form using dotnetfactory.

    can u help me on this plz.

    Thanks..

    Comment by mmata | March 6, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 129 other followers

%d bloggers like this: