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 |
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
Does QTP support Java Script also. Which is one is preferrable for QTP, VB script or Java script
write script for how to add function library in QTP
How will you report the bug and explain the defect tracking sheet you handled?
why was automation used in the project?
Qtp Automation Engineer , Can he login in VSS? What purpose he login In VSS? But Some companys are using CVS AND VSS ? some are Have log in in VSS Some Not login(not accessing) into VSS, not login persons are working on CVS? my doubt is, can Qtp automation engineer have loin in VSS or not? Where he store QTp Script?
How will you handle java tree in qtp?
Discuss the QTP Environment?
Can we test GUI of the application using QTP.? How.?If possible briefly explain process.?
How to call a test from another test?
Limitations in QTP?
What is Object Spy?