How to covert a String to an integer?
Answers were Sorted based on User's Feedback
Answer / venkateshwarlu
using cint function
dim var1, var2
var1=10.89
var2=cint(var1)
msgbox var2
will give integer value : 10
Is This Answer Correct ? | 11 Yes | 5 No |
Answer / vulani
Here's the shortest way to do it Gents:
string mystr ("1204");
int myint;
stringstream(mystr) >> myint;
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / varun bisaria
CInt()---> a conversion function available.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / bfakruddin
dim str,num
str="Hello"
num=100
cstr=cint(str) ' It converts string into integer
msgbox cstr
cint=cstr(num) ' It converts Integer into string
msgbox cint
Is This Answer Correct ? | 8 Yes | 14 No |
Answer / raja83
you can use cint function
cint(10) will convert integer 1
Is This Answer Correct ? | 4 Yes | 11 No |
How to supress warnings from the "Test results page"?
Which object repository we use in real time and can we merge 2 object repostiory and how?
When we use Object Spy? can we write QTP script before built is came in testing?
i don't have any experience in qtp? Can u please tell me What work i have to do?
How many ways we can parameterize data in QTP ?
what is meant by source control?
I m in new and want to learn QTP. Is any website which provide free QTP video training.....also can downlaod....
WHat is Object Identification and Object Spy?
VM1 = "Invalid username or password. Please try again. " VM2 = "Email id is required.Password is required. " VM3 = "Email id is an invalid e-mail address.Password is required. " VM4 = "Password is required. " VM5 = "Email id is required. " VM6 = "Email id is an invalid e-mail address. " 'Rowcount of the Local sheet Rowcount = DataTable.GetSheet("Invalid login transactions").GetRowCount 'Valid emailid and Password Emailid = "test@iteamic.com" Password = "Password0" 'For i = 1 to Rowcount 'Parameterised Email_id Browser("Browser").Page ("Page").WebEdit("emailAddress").Set DataTable("Email_id", dtLocalSheet) EID = Browser("Browser").Page ("Page").WebEdit("emailAddress").GetRoProperty("value") 'Parameterised Password Browser("Browser").Page ("Page").WebEdit("password").Set DataTable("Password", dtLocalSheet) PWD = Browser("Browser").Page ("Page").WebEdit("password").GetROProperty("Value") If EID = Emailid And PWD = Password Then Reporter.ReportEvent micPass, "EID & PWD check", "Email id and Password is correct, One iteration of Invalid login attempts is not being executed" Else Browser("Browser").Page("Page").WebButton ("Sign-In").Click 'Output value exported to the local sheet Browser("Browser").Page ("Page_2").Output CheckPoint("Home page_Sign in") 'Storing the output value in a variable(OUTPUT OUTPUT = Datatable.GetSheet ("Invalid login transactions").Getparameter ("Validation_message_signin").value 'comparing the Variable Output and the Validation message for a given input If OUTPUT = VM1 Then Reporter.ReportEvent micPass, "VM1", "Invalid username or password. Please try again. " else if OUTPUT = VM2 Then Reporter.ReportEvent micPass, "VM2", "Email id is required.Password is required. " else if OUTPUT = VM3 Then Reporter.ReportEvent micPass, "VM3", "Email id is an invalid e-mail address.Password is required. " else if OUTPUT = VM4 Then Reporter.ReportEvent micPass, "VM4", "Password is required. " else if OUTPUT = VM5 Then Reporter.ReportEvent micPass, "VM5", "Email id is required. " else if OUTPUT = VM6 Then Reporter.ReportEvent micPass, "VM6", "Email id is an invalid e-mail address. " else Reporter.ReportEvent micFail, "EID & PWD check_FAIL", "Validation message checkpoint failed. The captured v msg is not required" End if End if I am getting syntax error saying "Expected 'End If'" at the last line, Why is this? Kindly explain...
How to use the Object spy in QTP 8.0 version?
What is the difference between low level recording and virtual object.
In what situations QTP will not recognize the Objects?