GET WHETHER THE GIVE NUMBER VALID OR NOT IN BETWEEN THE
GIVEN RANGE?IN VB SCRIPT(QTP)
Answers were Sorted based on User's Feedback
Answer / guest
Function ValidInteger(sNumber, iMin, iMax)
Dim iNumber
' Is it a number?
If IsNumeric(sNumber) Then
' Is it an integer?
If InStr(sNumber,".") = 0 Then
' Is it in the correct range?
If CLng(sNumber) >= iMin And CLng(sNumber) <= iMax Then
ValidInteger = "Valid Number Thank You"
Else
ValidInteger = "You must enter an integer between " & iMin &
" and " & iMax
End If
Else
ValidInteger = "You must enter a whole number"
End If
Else
ValidInteger = "You must enter a number"
End If
End Function
msgbox ValidInteger(9, 1, 10)
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / arun
'the above code was not working fine so i modified that
Validinteger 20,1,100
Function ValidInteger(sNumber, iMin, iMax)
Dim iNumber
' Is it a number?
If IsNumeric(sNumber) Then
' Is it an integer?
If InStr(sNumber,".") = 0 Then
' Is it in the correct range?
If CLng(sNumber) >= iMin And CLng(sNumber) <= iMax Then
msgbox "Valid Number Thank You"
Else
msgbox "You must enter an integer between " & iMin &" and " & iMax
End If
Else
msgbox "You must enter a whole number"
End If
Else
msgbox "You must enter a number"
End If
End Function
Is This Answer Correct ? | 2 Yes | 0 No |
Explain the check points in QTP?
If we write a script in the expert view how are the objects created in the object repository? to be clear i will explain my problem first i have recorded the mercurytours application by providing the link www.mercurytours.com and all the objects are stored in the object repository ok this is fine. but i have copied the script generated in the above processes and pasted in a new test and tried to run that script but as the objects were not stored in the object repository it showed an error (The "Welcome: Mercury Tours" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object).so how can i overcome that error
where we are going to write the descriptive programming.for example we are invoking qtp application where we are going to write that code
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?
How to create an Action Template?
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
how to re-install QTP 9.0 trial version.
what are the mandatory properties in qtp? what are the library functions in qtp?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
Syntax for how to call one script from another? and Syntax to call one "Action" in another?
Explain about datafile/verification of date file when file is not available in local system?
This is Ajay i have few douts if anybody know pls give me reply. 1. i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording