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 |
how can we retrieve ten rows from the data table using loop concept?
i have read that "non-reusable actions can not be called in any other test".but in 'call to copy action' copies non-reusable action in other test also..can u pls help to understand this..
There are some links on the page,count and click those links and check the text on the page displayed on clicking the link.write script for this scenario.
What is the another extension name of library file. If that is exist than what's the difference between them.
Explain synchronization types in QTP
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
Can we run test with out adding object in object repository? How it is possible?
how many types of actions r there? what r they? explain? pls give any one answer?
I am trying to read the rediffmail usign the below code. But facing problem, while i user to get the link of the mail, i am getting all the link of the page, While i just want to get only mail name - link (not all the link of an page) so that i able to read the mail message by clcking on them in qtp. Dim Lnk,Webcheckbox Set Lnk= Description. Create '********* To count and display the webcheckbox Lnk("micclass" ).value=" Link" set LinkName= Browser("Welcome to Rediffmail:" ).Page("Welcome to Rediffmail:" ).ChildObjects( Lnk) LinkCount=LinkName. Count msgbox LinkCount For i=1-1 to LinkCount-1 DataTable.SetCurren tRow(i) DataTable.Value( "Name",1) =LinkName( i).GetRoProperty ("name") Next Waiting for the reply Praveen Saini
Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...
In QTP where i have to concentrate more in the Interview point of View
Hi guys can any plz help me how to send fax in sample Flight Appication