Write a program to print all lines that contains a word either “testing” or “qtp”
Answer Posted / syamala usha
set fso = createobject("scripting.filesystemobject")
set f=fso.opentextfile("C:
otes HP.txt",1)
Do until f.atendofstream
str=f.readline
a = split(str," ")
flag=0
for j = 0 to ubound(a)
if (a(j) = "testing") or (a(j) = "qtp") then
flag=1
exit for
end if
next
if flag=1 then
msgbox str
end if
loop
f.close
set f= nothing
set fso =nothing
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Mention what is variant in vbscript?
What are class variables?
How will you get a combined string from array of string in vbscript?
What is loose binding? Why is it not a good practice to use it?
Explain the filter expression?
What is the purpose of the err object in the vbscript language?
What is the technology used by vb script?
Which in-built function is used to format the number in the vbscript language?
How to create a function in vbscript?
regular expression that will recognize a browser as long as its name property starts with mybrowser
How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
who will create the object?
Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.
Which data type/types are supported by vbscript language and what are their specialties?