rajani


{ City } bangalore
< Country > india
* Profession * test engineering
User No # 115391
Total Questions Posted # 0
Total Answers Posted # 5

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 0
Questions / { rajani }
Questions Answers Category Views Company eMail




Answers / { rajani }

Question { HP, 7970 }

hey please tell me how to retriev data from excel sheet
which puts the login name and password in the application?
plz send me the code..please help me


Answer

Option explicit
Dim objExcel,objExcelSheet,row,col,i,j

Set objExcel=CreateObject("Excel.Application")
objExcel.Workbooks.Open("D:QTPdata.xlsx")
'objExcel.Application.Visible=true
Set objExcelSheet=objExcel.ActiveWorkbook.Worksheets("Sheet1")


row=objExcelSheet.UsedRange.Rows.count
col=objExcelSheet.UsedRange.Columns.count


For i= 2 to row
For j= 1 to Col
' Print objExcelSheet.cells(i,j).value

InvokeApplication"C:Program Files (x86)HPQuickTest Professionalsamplesflightappflight4a.exe"
wait 1
dialog("Login").WinEdit( "Agent Name:").Set objExcelSheet.cells(i,j).value
wait 1
J=J+1
dialog("Login").WinEdit("Password:").Set objExcelSheet.cells(i,j).value
WAIT 1

DIALOG("Login").WinButton("OK").Click
wait 1
window("Flight Reservation").Close
wait 1

Next

Next


objExcel.Workbooks.Close
objExcel.Quit
Set objExcelSheet=Nothing

Set objExcel=Nothing

Is This Answer Correct ?    0 Yes 0 No

Question { Amazon, 4403 }

Could Anybody tell me the Script for REVERSE an Interger
int reverse(int num) Ex:246 to 642.. Thanks in Advance.


Answer

x=246
y=len(x)
For i=y to 1 step-1
c=mid(x,i,1)
d=d&c
Next
msgbox d

Is This Answer Correct ?    0 Yes 0 No


Question { 3999 }

Can anyone help me in write coding to get this pattern
*
**
***
****


Answer

Option Explicit
Dim i,j,k
for i=1 to 5

for j=1 to i

k=k&"*"&" "
Next
k=k&" "&vbnewline
next
msgbox k

Is This Answer Correct ?    1 Yes 0 No

Question { CSS Corp, 2259 }

reverse the string without using reverse string?


Answer

Option Explicit
Dim a,c,d,i
a="RajaniKanth"
For i=Len(a) To 1 Step-1
c=Mid(a,i,1)
d=d&c
Next
MsgBox d

Is This Answer Correct ?    0 Yes 0 No

Question { CSS Corp, 3058 }

find the length of the string without using length function?


Answer

Option Explicit
Dim a,text
text="I am Rajanikanth"
text=text&"@"
a=InStr(text,"@")-1
MsgBox a

Is This Answer Correct ?    0 Yes 0 No