murali raju


{ City } hyderabad
< Country > india
* Profession *
User No # 97079
Total Questions Posted # 17
Total Answers Posted # 38

Total Answers Posted for My Questions # 5
Total Views for My Questions # 21858

Users Marked my Answers as Correct # 227
Users Marked my Answers as Wrong # 141
Answers / { murali raju }

Question { Thatavarti Technologies, 110260 }

How to connect to the Database from QTP?


Answer

Through scripting this is way to connect the database
Example:-

set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for
Oracle}:Server=DBserver,UID=Sa,Password=sa"
conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="select * from Users"
Rec.open SQL ,conn
Username=Rec.fields("employee name")
Msgbox Username

Is This Answer Correct ?    86 Yes 20 No

Question { Thatavarti Technologies, 110260 }

How to connect to the Database from QTP?


Answer

Microsoft ADO (ActiveX Data Objects) is a Component object
model object for accessing data sources.The ADO Recordset
object is used to hold a set of records from a database
table. A Recordset object consist of records and columns
(fields).
In ADO, this object is the most important and the one used
most often to manipulate data from a database.

Srvname is a connection string.if u already installed
oracle in your system..using that path u can connect oracle
database...if u dont have oracle give the conncetion string
path..whatever connection string created used in database
checkpoint by
default...Example:DSN=QT_Flight32;DBQ=C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight32.mdb;Driver=C:\WINDO
WS\system32\odbcjt32.dll;DriverId=281;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;

Is This Answer Correct ?    39 Yes 6 No


Question { Polaris, 10314 }

What are the recording modes and executing modes avialble
in QTP?


Answer

Recording Modes:--
1)Normal Recording
2)Analog Recording
3)Low level Recording


Execution Modes:--
1)Normal(Display Execution Marker)
2)Fast

Is This Answer Correct ?    9 Yes 1 No

Question { US Technology, 57277 }

What is the latest version in QTP?


Answer

The latest version of QTP is 9.2

Is This Answer Correct ?    15 Yes 81 No

Question { BirlaSoft, 20001 }

How to connect QTP to Testdirector


Answer

First install qtp 9.0 or 8.2 in your machine..after install
testdirector 8.0 or Qualtiy center.The latest version of
Test director is webbased test management tool.After
installing the Test Director u got one url for accessing
test director..Then copy that url. Then switch to Qulity
center conncetion option in QTP .then paste it in that url
appropriate quality center connection window..then clik
connect..it will takes some time ..

Is This Answer Correct ?    10 Yes 2 No

Question { BirlaSoft, 20001 }

How to connect QTP to Testdirector


Answer

I am sending the complete script to connect Quality Center

'***********************************************************
************************************************************
*

'Description:

'

'This example connects to a Quality Center project, opens a
test (checks it out, if applicable),

'updates the Active Screen values and test object
descriptions, and, if applicable,

'checks the modified test back into the Quality Center
project.

'

'Assumptions:

'The test1 test is not already checked out.

'There is no unsaved test currently open in QuickTest.

'For more information, see the example for the Test.SaveAs
method.

'When QuickTest opens, it loads the add-ins required for
the test.

'For more information, see the example for the
Test.GetAssociatedAddins method.

'***********************************************************
************************************************************
*



Dim qtApp 'As QuickTest.Application ' Declare the
Application object variable

Dim qtUpdateRunOptions 'As QuickTest.UpdateRunOptions '
Declare an Update Run Options object variable

Dim qtRunResultsOptions 'As QuickTest.RunResultsOptions '
Declare a Run Results Options object variable

Dim blsSupportsVerCtrl ' Declare a flag for indicating
version control support



Set qtApp = CreateObject("QuickTest.Application") ' Create
the Application object

qtApp.Launch ' Start QuickTest

qtApp.Visible = True ' Make the QuickTest application
visible



' Make changes in a test on Quality Center with version
control

qtApp.TDConnection.Connect "http://tdserver/tdbin", _
"MY_DOMAIN", "My_Project", "James", "not4you",
False ' Connect to Quality Center



If qtApp.TDConnection.IsConnected Then ' If connection is
successful

blsSupportsVerCtrl =
qtApp.TDConnection.SupportVersionControl ' Check whether
the project supports vervion control



qtApp.Open "[QualityCenter] Subject\tests\test1",
False ' Open the test

If blsSupportsVerCtrl Then ' If the project supports
version control

qtApp.Test.CheckOut ' Check out the test

End If



' Prepare the UpdateRunOptions object

Set qtUpdateRunOptions = CreateObject
("QuickTest.UpdateRunOptions") ' Create the Update Run
Options object

' Set the Update Run options: update the Active Screen
and test object descriptions. Do not update checkpoint
values

qtUpdateRunOptions.UpdateActiveScreen = True

qtUpdateRunOptions.UpdateCheckpoints = False

qtUpdateRunOptions.UpdateTestObjectDescriptions = True



' Prepare the RunResultsOptions object

Set qtRunResultsOptions = CreateObject
("QuickTest.RunResultsOptions") ' Create the Run Results
Options object

qtRunResultsOptions.ResultsLocation
= "" ' Set a temporary results location



'Update the test

qtApp.Test.UpdateRun qtUpdateRunOptions,
qtRunResultsOptions ' Run the test in Update Run mode

qtApp.Test.Description = qtApp.Test.Description &
vbNewLine & _
"Updated: " & Now ' Document
the update in the test's description (Test Settings >
Properties tab)



qtApp.Test.Save ' Save the test



If blsSupportsVerCtrl And qtApp.Test.VerCtrlStatus
= "CheckedOut" Then ' If the test is checked out

qtApp.Test.CheckIn ' Check it in

End If



qtApp.TDConnection.Disconnect ' Disconnect from Quality
Center

Else

MsgBox "Cannot connect to Quality Center" ' If
connection is not successful, display an error message.

End If



qtApp.Quit ' Exit QuickTest

Set qtUpdateRunOptions = Nothing ' Release the Update Run
Options object

Set qtRunResultsOptions = Nothing ' Release the Run Results
Options object

Set qtApp = Nothing ' Release the Application object

Is This Answer Correct ?    9 Yes 1 No

Question { 7056 }

I am using Shared OR, and my collegues are also using
Shared OR. How to merge Object Repositories?


Answer

which version of qtp ur using?8.2 or 9.0

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 4573 }

What are Add-ins availble in licensed version QTP8.2


Answer

The Default add-ins are Activex,Web,Visual Basic and
Standard windows..ok..na..

Is This Answer Correct ?    1 Yes 1 No

Question { 8988 }

is we can import the object repository from external
source. if it so then how?


Answer

Open the .tsr file using object repository tool
window..plz mention which version of qtp u r using at the
time of asking question..so i will explain with
navigation...

Is This Answer Correct ?    0 Yes 0 No

Question { iFlex, 9191 }

when we right click on the desktop of any operating system
we find a menu , consisting of refresh,edit,open,paste and
cut etc...
how to load the object and object properties of that menu
in QTP


Answer

I think it's not possible to add the object repository...

Window("Program Manager").WinListView
("SysListView32").Click 753,200
Window("Program Manager").WinListView
("SysListView32").Click 753, 200, micRightBtn
Window("Program Manager").WinObject
("SHELLDLL_DefView").WinMenu
("ContextMenu").Select "Refresh;"

Try this code in ur system...at that time of recording only
we can add those type of menus..if i am wrong..then mailme..

Is This Answer Correct ?    0 Yes 2 No

Question { Sinertel, 8280 }

How 2check the color of the text in the textfield .
say suppose the text entered in the textfield object is
appearing in red. so i want to check whether the text is in
red color or not.
It could be great help for me if any one solve's my issue.
plz...help


Answer

Only specific Environment objects have color property or
backcolor property of forecolor property..Tell me what is
object type of textfiled like winedit or webedit or vbedit
or swfedit....then i will tell whether u r able to check
that color property of that particular object?i just want
what is nativeclass property of that text field.?

Is This Answer Correct ?    0 Yes 0 No

Question { MBT, 8384 }

Plze let me know how you can validate in the QTP that
printed documents is correctly printed or not ie how we can
do the validation that all the records or text are printed
successfully in the printed document as per the application
format requuired.


Answer

did u install the microsof office document image
writer..all prints will go thorught that document
writer..so we can validate printing documents using that
image writer documents.

Is This Answer Correct ?    0 Yes 1 No

Question { MBT, 8384 }

Plze let me know how you can validate in the QTP that
printed documents is correctly printed or not ie how we can
do the validation that all the records or text are printed
successfully in the printed document as per the application
format requuired.


Answer

your microsoft image writer have ocr facility..?i mean ocr
recognization test...if u have that feature..u can able to
caputute the text in that document...ok..na.

Is This Answer Correct ?    0 Yes 0 No

Question { 5775 }

How to call the userdefined functions to script? If i am
stored 'add()' function in Library functions folder. i want
to cal that function in my script.


Answer

Instead of add name put the add1 as ur function
name...because add is keyword

Function add1(a,b)
c=a+b
add1=c
End Function 'put the function .vbs file and save it c
drive with the file name addition.vbs

write the below script in ur qtp

ExecuteFile "c:\addition.vbs"
x=add1(2,4)
msgbox x 'it will be prints 6 in the msgbox

Is This Answer Correct ?    1 Yes 0 No

Question { 5775 }

How to call the userdefined functions to script? If i am
stored 'add()' function in Library functions folder. i want
to cal that function in my script.


Answer

Hello...pramod..Put the function in notepad and save
as .vbs extension then call through the above execute file
statament in qtp ...ok.na..

Is This Answer Correct ?    0 Yes 0 No

Prev    1    [2]   3    Next