QTP Questions
Back
Next
- How to open an application through scripting?
A. The following code is the scripting to open an application.
Browser = "IE"
StartURL = "www.hotmail.com"
IF Browser = "IE" THEN
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = true
IE.Navigate StartURL
END IF
- How you call functions in QTP?
A. Create your own .vbs file and we can call that file in qtp by calling the function of that file.
- What is API?
A. Application program interface.
- What are advance features you had done in QTP?
A.
1. I used regular expression concept.
2. Test Batch run.
3. Calling existing action.
- Tell about automation object model(Aom) in qtp?
A. Aom is the concept of "TO AUTOMATE THE QTP ITSELF".
- How to connect to database?
A. Using ADODB Object
Example
DB_Connect=CreateObject(ADODB.Connection)
Public Function database(Str,SQLstr,outResult1,outResult2)
'//Variable Declarations
Dim objConn, rsOut
'//Create a connection object.
Set objConn = CreateObject("ADODB.Connection")
'//Create a ResultSet Object to store the results.
Set rsOut = CreateObject("ADODB.Recordset")
'//Open the Created Connection object
objConn.Open Str
'//Pass the SQL query string and retrieve the Results
through the connection object
rsOut.Open SQLstr,objConn
If rsOut.EOF <> True AND rsOut.BOF <> True Then
'//Store the different column values
retrieved from a record in different variables.
outResult1=rsOut("col1")
outResult2=rsOut("col2")
rsOut.movenext
End If
End Function
- We are submitting data one form to another form,defaultly it's time period set as 5sec.
but it is taking 15sec what to do?
A. Syncronization is the best way to do that particular task.
wait() function sends wr in sleepmode, it's wastage of time.
- What is a Test Strategy & What is the difference between Test Strategy & Test Plan?
A. Test strategy is a company level document and which says the approach for testing. The test strategy doc
also says that the scope, business issues, test deliverables, tools used, risk analysis etc. Whereas test plan is document
which says what to test, when to test, how to test and who to test. The test plan document was prepared by the test lead.
