Write a program to print all lines that contains a word either “testing” or “qtp”
Answer Posted / 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 |
Post New Answer View All Answers
Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Explain the support of asp for vb script functionality?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
Out of the different type of operators, which are evaluated first and last in the vbscript language?
who will create the object?
how to acces the remote mechine using vb cript(QTP)
what is event handling?
When does ‘on click of button’ event gets triggered in the vbscript language?
How can the spaces from the string be removed?
What is the purpose of folders object of scripting.filesystemobject class in vbscript?
what is the differance between BYVAL,BYREF?
did any one attended interview in applabs if you had gone through plz tell me the procedure
What is the scope of a constant declared using public?
Mention characteristics of sub procedures?