'Open QTP
Set qtpApp = CreateObject("QuickTest.Application")

I am confused at some point.
You oen QTP by code, then it is mean that you are not in QTP, and if
you are not in QTP from which editor you get your vb code worked ?

For example can I use excel macro as a vb tool, or Visual Studio ?

Which tools you advice to me ?

And another question
What is the real purpose here, why you need to start QTP from outside the QTP ?

2012/4/22, [email protected] <[email protected]>:
> =============================================================================
> Today's Topic Summary
> =============================================================================
>
> Group: [email protected]
> Url: http://groups.google.com/group/mercuryqtp/topics
>
>   - Manupuate DOM value [1 Update]
>     http://groups.google.com/group/mercuryqtp/t/234b11dff8f51bd2
>   - Send me the Driver Sript [1 Update]
>     http://groups.google.com/group/mercuryqtp/t/586671c8bc6f37cb
>   - Objects not appearing after i select an item form list [1 Update]
>     http://groups.google.com/group/mercuryqtp/t/1ca801712f574bd4
>   - how to return a value from function [1 Update]
>     http://groups.google.com/group/mercuryqtp/t/a8a1c21521635dce
>   - How to selelct the automation candidature for regression testing? [2
> Updates]
>     http://groups.google.com/group/mercuryqtp/t/7be51b585c09bc81
>   - Interview question [4 Updates]
>     http://groups.google.com/group/mercuryqtp/t/689f3305be84460c
>   - Vbscript - QTP - handle DB table column of type Image [1 Update]
>     http://groups.google.com/group/mercuryqtp/t/784b405af1658c90
>
>
> =============================================================================
> Topic: Manupuate DOM value
> Url: http://groups.google.com/group/mercuryqtp/t/234b11dff8f51bd2
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 10:13PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/4a17f1f3920e6471
>
> Hi,
>
> Did you find any solution for this? I think it is not possible..
>
> As a workaround, you can right-click on the link and select Copy Shortcut
> option. Then you can paste it in the same browser and try opening it.
>
> Btw, what is the issue if it opens in a different browser?
>
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
>
> *
> --
> ar
>
>
>
> =============================================================================
> Topic: Send me the Driver Sript
> Url: http://groups.google.com/group/mercuryqtp/t/586671c8bc6f37cb
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 09:56PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/ece5f09486ed2ed3
>
> Hi Tirumala,
>
> Driver script is a code (usually VBScript) that acts as a starting point
> for your test case execution. Consider an example where you have 100 test
> cases in your suite. For this,you can create a driver script that would
> load each to these test cases in QTP one by one and ask QTP to run these
> TCs. You can have a variety of filters set in here. For example, you can
> write code where your driver script will run all the test cases, only some
> test cases (which you would specify beforehand), all the failed test cases
> etc etc.
>
> Also in the driver script you can write code which will change QTP run
> settings like to run the TC in normal mode or fast mode, where to save the
> results after execution of TC. Also sending mails with the test run report.
>
>
> The driver script code is completely dependent on the frameworks. You
> change the framework, your driver script will have to change. Since the
> structure of Hybrid framework can be anything, so there is no fixed format
> for the driver script.
>
> Check the below code, which you can use to run a test case. This example is
> just to show on how you can use a driver script.
>
> Dim testCasePath, resultPath
> testCasePath = "D:\QTP\GMail Inbox1"
> resultPath = "D:\QTP\Result"
>
> 'Open QTP
> Set qtpApp = CreateObject("QuickTest.Application")
>
> 'If QTP is not open then open QTP application
> If qtpApp.launched <> True Then
>     qtpApp.Launch
> End If
>
> 'Make the QuickTest application visible
> qtpApp.Visible = True
>
> 'Set QuickTest run options
> qtpApp.Options.Run.ImageCaptureForTestResults = "OnError"
> qtpApp.Options.Run.RunMode = "Fast"
> qtpApp.Options.Run.ViewResults = True
>
> 'Open the test in read-only mode
> qtpApp.Open testCasePath, True
> WScript.Sleep 2000
>
> 'set run settings for the test
> Set qtpTest = qtpApp.Test
>
> 'Instruct QuickTest to perform next step when error occurs
> qtpTest.Settings.Run.OnError = "NextStep"
>
> 'Create the Run Results Options object
> Set qtpResult = CreateObject("QuickTest.RunResultsOptions")
>
> 'Set the results location
> qtpResult.ResultsLocation = resultPath
>
> 'Run the test
> WScript.Sleep 3000
> qtpTest.Run qtpResult
>
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
> *
> --
> Regards,
> Anish Pillai
> My QTP Blog <http://automationrepository.blogspot.com>
>
>
>
> =============================================================================
> Topic: Objects not appearing after i select an item form list
> Url: http://groups.google.com/group/mercuryqtp/t/1ca801712f574bd4
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 09:19PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/d555323d97c2422e
>
> Hi Vinod,
>
> This happens because sometimes the application waits for some keyboard or
> mouse event to make some changes. In your example, when you select the item
> from the list manually using your mouse, the mouse event occurs. So
> application displays the additional values. So in QTP, you need to simulate
> the mouse, so that the applications can capture that. Check the below link
> for more details.
>
> http://knowledgeinbox.com/articles/qtp/settings/when-to-change-qtp-web-replaytype-setting/
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
> *
> --
> ar
>
>
>
> =============================================================================
> Topic: how to return a value from function
> Url: http://groups.google.com/group/mercuryqtp/t/a8a1c21521635dce
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 09:13PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/46e03071e841a94e
>
> Hi Vamsi,
>
> You need to define the variable with global scope so that it becomes
> available inside and outside the function. This way you would not need to
> pass the variable inside the function. Typically you can declare the
> variable at the beginning of the code. Eg
>
> Dim var
> var = 10
> msgbox var  'this displays 10
>
> Function fnTest()
>   var = var + 5
>   msgbox var    'this shows 15
> End Function
>
> msgbox var   'this shows 15
>
>
> Now when you pass the value to a function using ByVal a copy of the
> variable is sent to the function. So whatever change you make to that
> variable inside the function it will not reflect to the original variable
> outside the function. So in your code above, use ByRef instead of ByVal. ie
> use Public function InsertOrder(*byRef *Order_Nu )
>
> If you want to use any variables across actions, you can define the
> variable inside your function library so that they are available to all the
> actions associated with the function library.
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
> *
>
> --
> Regards,
> Anish Pillai
> My QTP Blog <http://automationrepository.blogspot.com>
>
>
>
> =============================================================================
> Topic: How to selelct the automation candidature for regression testing?
> Url: http://groups.google.com/group/mercuryqtp/t/7be51b585c09bc81
> =============================================================================
>
> ---------- 1 of 2 ----------
> From: vijay kanaparthi <[email protected]>
> Date: Apr 21 09:09PM -0700
> Url: http://groups.google.com/group/mercuryqtp/msg/a0bdbdbf55a5dab5
>
> Hi,
>
> if i give 1000 regression test cases to automate, what do do? and how
> to select automation candidature for this scenario?
>
>
> ---------- 2 of 2 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 09:01PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/ce4ee214a45989a9
>
> Hi Vijay,
>
> There are many things that you need to consider for this. Check the below
> link and see if it helps.
>
> http://www.automationrepository.com/2011/10/is-your-application-a-good-candidate-for-qtp-automation/
>
> Please let us know your observations.
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
> *
>
> --
> Regards,
> Anish Pillai
> My QTP Blog <http://automationrepository.blogspot.com>
>
>
>
> =============================================================================
> Topic: Interview question
> Url: http://groups.google.com/group/mercuryqtp/t/689f3305be84460c
> =============================================================================
>
> ---------- 1 of 4 ----------
> From: vijay kanaparthi <[email protected]>
> Date: Apr 21 07:10AM -0700
> Url: http://groups.google.com/group/mercuryqtp/msg/1563fdca006de25c
>
> Hi Frnz..
>
> Q-I have an excel file which have the columns like Emp_Name,Emp_id,
> Emp_Salary.
>
> how i will get all the details of the employee who is having salary
> 5000.Through QTP only..
>
>
> ---------- 2 of 4 ----------
> From: sujit kumar <[email protected]>
> Date: Apr 22 12:21AM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/4aa335d6e931e106
>
> Hi,
>
> ''assuming ur Column like this
> ''EmpName | EmpID | Salary"
>
> Call Fn_PrintEmpDetials("5000")
>
>
> Function Fn_PrintEmpDetials(empSal)
> Dim objExcel,objWorkBook
> Dim objvalueFind,sAddress,aRowCol,usedRowCount
> Set objExcel = CreateObject("Excel.Application")
> objExcel.visible=False
> objExcel.AlertBeforeOverwriting=False
> objExcel.DisplayAlerts=False
> Set objWorkBook = objExcel.Workbooks.Open ("c:\ExcelFile.xls")
> Set Cells=objSheet.Cells
> Set objvalueFind=objSheet.UsedRange.Find("EmpName")
> If Not objvalueFind is Nothing  Then
> sAddress=objvalueFind.Address
> aRowCol=Split(sAddress,"$",-1,1)
> 'now u have column name EmpName
> empNameColumn=aRowCol(2)
> empNameRow=aRowCol(1)
> End If
>  Set objvalueFind=objSheet.UsedRange.Find("Salary")
> If Not objvalueFind is Nothing  Then
> sAddress=objvalueFind.Address
> aRowCol=Split(sAddress,"$",-1,1)
> 'now u have column name of salary
> salaryColumn=aRowCol(2)
> salaryRow=aRowCol(1)
> For iRowIteration=1 to objSheet.UsedRange.Rows.Count
> getSalary=Cells(aRowCol(2),aRowCol(1)).Value
> If Cstr(getSalary)=Cstr(empSal)Then
> 'it will print name of employe which having 5000 salary
> print Cells(empNameColumn,aRowCol(1)).Value
> 'it will print salary of employe which having 5000 salary
> print Cells(salaryColumn,aRowCol(1)).Value
> End If
>  Next
> End If
> objExcel.ActiveWorkbook.Save
> objExcel.Workbooks(1).Close
> objExcel.Quit
> Set objSheet=Nothing
> Set objExcel=Nothing
> End Function
> --
> Note: few Variable declaration are missing please check It will work fine
> let me know u have further any query
>
> :)
> Thanks & Regards
> Sujit
>
> On Sat, Apr 21, 2012 at 7:40 PM, vijay kanaparthi <
>
>
> ---------- 3 of 4 ----------
> From: Deepak Kumar Mahapatro <[email protected]>
> Date: Apr 22 01:03PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/1ad2429b30396706
>
> you can use ADODB objects to access the excel and execute sql query
>
>
> --
> Regards,
> Deepak
>
>
> ---------- 4 of 4 ----------
> From: Anish Pillai <[email protected]>
> Date: Apr 22 08:56PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/788db10088021bed
>
> Hi Vijay,
>
> There are 2 ways you can read data from excel sheet into QTP.
>
> *1) *Use the native functions exposed by excel to directly copy the the
> data from excel. *This is technically the functionality exposed by MS
> Excel. So in one way this has nothing to do with QTP. You can do this
> without QTP also.* The code that Sujit mentioned above uses this method to
> retrieve values from the xls.
>
> *2) *The second method is the QTP specific code where you first import the
> excel data into QTP datatable. After the data is imported, you use the data
> table functions to copy the code.
>
>
> One more query. In interviews, do they ask to write the code? Or they just
> ask the logic or algo? Because I'm not really sure whether people will
> remember the syntax and all.
>
>
> *
> Cheers,
>  a n i s h
>
> [QTP
> Tutorial]<http://www.automationrepository.com/tutorials-for-qtp-beginners/>|
> [VBScript
> Tutorial]<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/>|
> [QTP
> Blogs] <http://www.automationrepository.com/qtp-blogs/>
>
> **
> [** Subscribe to Get New Posts in your Inbox
> **]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
> *
>
> --
> Regards,
> Anish Pillai
> My QTP Blog <http://automationrepository.blogspot.com>
>
>
>
> =============================================================================
> Topic: Vbscript - QTP - handle DB table column of type Image
> Url: http://groups.google.com/group/mercuryqtp/t/784b405af1658c90
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Deepak Kumar Mahapatro <[email protected]>
> Date: Apr 22 01:13PM +0530
> Url: http://groups.google.com/group/mercuryqtp/msg/e7b4ba804f8b8ca2
>
> why can't you compare those byte arrays. i think if those are equal then
> the images are also equal
>
>
> --
> Regards,
> Deepak
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>


-- 
Rasim Avcı

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to