ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
I want to check in the data table(Globalsheet) column exist 
or not through script .If column not  exist only proceeded 
to next step Pls tell me how to proceeded?
 Question Submitted By :: Ravikiran
I also faced this Question!!     Rank Answer Posted By  
 
  Re: I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?
Answer
# 1
Function isParameterExists(sheetName, paramName)

isParameterExists = FALSE
ParamTotal = DataTable.GetSheet("Global").GetParameterCount

For i = 1 To ParamTotal
value = DataTable.GetSheet("Global").GetParameter(i).Name
Msgbox value
If strComp(paramName,value)=0 Then
isParameterExists=TRUE
Exit Function
End if 
Next
End Function 
'Example:
If isParameterExists("Global","hh") then
msgbox "Patameter exists"
Else
msgbox "Patameter does not exist"

<Your statements>


End if
 
Is This Answer Correct ?    2 Yes 1 No
Ravi Bandaru
 
  Re: I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?
Answer
# 2
Hi ravi Please run above sript in qtp.
is it works?
 
Is This Answer Correct ?    0 Yes 5 No
Nani4urs
[BSL]
 
 
 
  Re: I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?
Answer
# 3
Try for this,

Val = DataTable("UserId", dtGlobalSheet)
If val=false Then
    msgbox "Parameter does not exist"
Else
    msgbox "Parameter exists" 
End If
 
Is This Answer Correct ?    1 Yes 5 No
Rajaputra
 
  Re: I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?
Answer
# 4
Answer 1 is good if you don't have a lot of data to write to
the data table. I sometimes have 20 columns to write to and
to check for the column each time before writing the data
can take 2 or more seconds each (40 seconds for the entire
row)...way to long if doing a repetitive task.

Answer 3 won't work because you will get a QTP error on the
line "Val = DataTable("UserId", dtGlobalSheet)" if the
column doesn't exist. But you can use that error to make a
very speedy function to find out if the column exists:

If COM_DoesDataTableColumnExist("Global","Column1") Then
   ''Column Exists
Else
   ''Column Does Not Exist
End If

Public Function COM_DoesDataTableColumnExist(ByVal
strSheetName,ByVal strColumnName)
	Dim blnReturnValue
	Dim strTestColumn
	
	Err.Clear
	On Error Resume Next
	strTestColumn =
DataTable.GetSheet(strSheetName).GetParameter(strColumnName).Name

	If Err <> 0 Then
		blnReturnValue = False
	Else
		blnReturnValue = True
	End If
	Err.Clear

	COM_DoesDataTableColumnExist = blnReturnValue
End Function
 
Is This Answer Correct ?    5 Yes 0 No
Drew
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How can i use Output Check points in QTP  1
Can we directly start working with QTP without any knowledge on WinRunner? (After getting trsining on QTP)  1
Among the 3 Recoring modes,Standard, Analog and Low Level. which one is mostly used. I know that Analog id used for Graphs, Digital Signatures and Barcoding. so, which one among the 2?  1
How to parameterize a text field and the same field as combo field on next page. Means inserting values in Text field will appear in the combo field. for example country name, state name. Kindly reply it is urgent !!! Adobe1
what is the difference between image and bitmap check point  3
how to identify the user defind varibles? plz tell me  1
How to manage a drag drop event in the qtp  1
Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?  2
HOW TO DO THE BATCH TESTING USING QTP? CTS6
IF we use batch testing.the result shown for last action only.in that how can i get result for every action.  2
Iam doing automation in Oracle App's using QTP? In App's because of some functional setup, keep on changing my script flow. for this how can i use the recovery sceanrio?? Please help me?  1
what is batch run ? HCL4
what is descriptive programming in QTP? How can be done? Accenture10
can anyone tell me how to search a word/line in a document and to paste it in another file? Thanks in advance.  4
how much space occupies in object respository by default? VSoft5
Hi every body, I am new to QTP.pls help me if anybody knows the solution. Here is my doubt: I have 3 excel sheets in my local drive out of which one is password protected and i want to get the data of all these xL's either by importing or by reading the data finally i have to update this data in the website.(and the site is secured site) I tried by importing all XL"s one by one but couldn't do so. plss send me the code or atleast suggest me the approach. Thanks in Advance Padmaja  3
what questions i have to pripare for project manager round interview ? plz give Ans.(Chandana) TCS3
waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??  3
Hi everybody, Can anybody tell me that how the QTP frameworks are implemented . I wanted to know with examples . Thanks in advance  1
I want to create Excel object on another machine which is in network i written the code "Set se=createobject ("Excel.Application","\\ankur")"here \\ankur is the name of that machine but i m getting the error of permission denied create object can anybody help me  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com