Write a program to print all lines that contains a word either “testing” or “qtp”
Answers were Sorted based on User's Feedback
Answer / amit
''' Write a program to print all lines that contains a word either “testing” or “qtp”
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile("C:UsersAmit MoolchandaniDesktop est.txt",1,True)
Do While objFile.AtEndOfStream <> True
str = objFile.ReadLine
If Instr(1,str,"Testing",1) Or Instr(1,str,"qtp",1) Then
Print str
End If
Loop
objFile.Close
Set objFile = Nothing
Set fso = Nothing
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / 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 |
What is a class in CSS?
can anyone tell me the procedure of interview held in applabs
compare the string without using stringcomp function?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
Write a program to resize an array of 5 elements to 4 elements and display all the elements.
What are lbound and ubound in the vbscript language?
a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
what is the function to display current date?
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
Explain about the support of asp for vb script functionality?