Write a script to print below pattern
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
Answers were Sorted based on User's Feedback
Answer / lakshmi
for i=1 to 5
for j=5 to i step -1
temp=temp & " "& j
Next
temp=temp&vbcrlf
Next
Msgbox temp
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vishnu
For i=5 to 1 step -1
temp = temp & i
Next
For i=5 to 1 step -1
print temp
temp = left(temp,i-1)
Next
| Is This Answer Correct ? | 0 Yes | 3 No |
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
in Qtp,how to display user name and pwd (script)in data table(global sheet).
Hi, I have a login page. To login in that page I need to have a valid username and password, which is stored in database. I imported that table to my DataTable in QTP (Global sheet). Now I need to write a code in qtp so that I can login only with valid username and data. my condition is : I want to get username and password from inputbox(which i did) and click on login button- which should verify the datatable for username and password and if value is present only then lofin else stop the testing. DataTable contains columns : LoginName and Password Code: Rowcount= DataTable.GetSheet("Global").GetRowCount msgbox "RowCount= " &RowCount,1 CurrentRow= DataTable.SetCurrentRow(1) Do Browser("").Page("").Frame("Frame").WebEdit("ctl10$ct l00$ctl00$UserName$ctl").Set DataTable("LoginName",1) Browser("").Page("").Frame("Frame").WebEdit("ctl10$ct l00$ctl00$Password$ctl").Set DataTable("Password",1) Browser("").Page("").Frame("Frame").Link("Login").Cli ck CurrentRow=CurrentRow+1 Loop Until CurrentRow>Rowcount Can anyone help? Thanks, Priya
In QTP, Which are the concepts are needed to do Functional testing and Regression testing?
How to display the first 3 letters in these "ABCDEFGH" using qtp script?
1. IS A VIRTUAL OBJECT USED WHEN THE LABEL IS NOT RECOGNIZED BY QTP
What is the extension of script and object repository files in QTP?
How can I use the value retrieved by OUTPUT VALUE check point as Input for other Actions?
what is the advantages and disadvantages of using functions instead of re usable actions
How can I replace all the text from the QTP script with some other text. Is there any replace all function in QTP Any one can help me
Do we have to Enable Smart Identification while running Or will it automatically be enabled ?
Explain the new feature of UFT regarding the export of test results?