Quality is delighting customers
Hi friends,
1.write a vbscript in qtp, str= MaHeNdeR
in above string,i want to all uppercase character comes into one msgebox 1 and lower case characters into msgebox 2 like
msgbox1(MHNR) and msgbox2 (aede) like these ?
2.write a vbscript in qtp,like 10,20,30,10,5,78,0,10....
i want 10th positions numbers like positions 1,4,8 or first position,fourth position,eighth position etc..
3.write a sql query, second hightest maximum salary and empid in emp table and aslo all empids in emp tables in single query?
4.write a descriptive programming ,scenario like
i having checkbox,in tat india,uk ,us.but i'don't known the sequence of order.i want india?how?
5.write a vbscript in qtp ,the scenario like
i having listbox like one,two,three,four but i want two and four values,at a times ?how?
6.In a webpage,like webelement of in page,count "am" in entire page ?write qtp script?
Tags:
Hi,
for first question ans
a="MaHeNdeR"
For i=1 to len(a)
b=mid(a,i,1)
If asc(b)>=65 and asc(b)<=90 Then
c=c&b
else
d=d&b
End If
Next
msgbox c
msgbox d
for second question...
Dim x,y,z
myarray=Array("10","20","30","10","5","78","0","10")
x=myarray(0)
MsgBox x
y=myarray(3)
MsgBox y
z=myarray(7)
MsgBox z
Hi lakshmi kanth,
ur given answer is correct but i want logically.
ur specified the inputs as positions and output as "10" but input as "10" and output as "positions no.'s".
Thanks,
mahender
Hi mahender,,,
you asked the positions for 1,4 & 8 ..so i given the script....I am not getting you,what you asking...?
Hi lakshmi kanth,
for better understandable i specify like positions numbers in my questions.
write a vbscript in qtp,like 10,20,30,10,5,78,0,10....?display the 10th positions no. and logically or looping method?
Thanks,
Mahender.
Hi,
For second question answer is
myarray=array("10","20","30","10","5","78","0","10")
x=inputbox("Enter the number to findout the positions")
For i=0 to ubound(myarray)
if(x=myarray(i)) then
pos=pos & i &","
else
temp=i
end if
Next
msgbox "positions are"&space(1) & pos
© 2022 Created by Quality Testing.
Powered by