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
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
What is the use of the instr function?
does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks
Which event is triggered when mouse focus comes out of an element in the vbscript language?
How are comments handled in the vbscript language?
Why is error handling required?
What are the rules to name variable in vbscript?
What is the main difference between function and sub-procedure?
What is event handling in vbscript?
Mention how to access array data?
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
Which constant is used for print and display functions and works as same as pressing enter key?
Which function is used in the vbscript language to convert the specified expression into a date type value?
How to create a cookie using vbscript?