write a vb script to print even numbers from 1-50?
Answer Posted / smitha
for i = 1 to 50
if i mod 2 = 0 Then
evenStr = evenstr & i & " , "
end if
Next
MsgBox evenStr
| Is This Answer Correct ? | 34 Yes | 20 No |
Post New Answer View All Answers
Can anybody post some real time scenario in qtp? please its very urgent.
Can I change properties of a test object?
after initiating one project for testing, when exacltly QTP tester role starts?
How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If
How software tester can use constants and variables in scripts?
What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.
How you calling actions in qtp?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
what is the diffrence bw qtp architectute and qtp framework?
Why qtp always start action1 and does not start action?
How can I check if a environment variable exist or not?
What is the syntax to call one action in another?
What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);
Can any one send me the QTP Basic Coding Samples?
Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.