Think Only Automation

Think Only Automation Expert Level QTP Training in Noida/Ghaziabad
http://thinkonlyautomation.in/

04/11/2021

Wish you and your family a very happy, healthy and prosperous DIWALI 🪔

26/08/2015

Difference between atendoffile and atendofstream:

The difference between AtEndOfline and AtEndOfstream is :
AtEndOfline reads till it encounters a new line.
AtEndOfstream reads till end of the file.

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile= fso.CreateTextFile("C:\TEMP\testfile.txt", True)
MyFile.WriteLine("This is a test1.")
MyFile.WriteLine("This is a test2."+vbnewline)
MyFile.WriteLine("This is a test3.")
MyFile.Close

AtEndOfline ::::::
Const ForReading = 1

Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile("C:\TEMP\testfile.txt", ForReading, False)
Do While theFile.AtEndOfline True
MSGBOX theFile.Readline
Loop
theFile.Close

returns the output as ::
This is a test1.
This is a test2.

AtEndOfStream:::::
Const ForReading = 1

Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile("C:\TEMP\testfile.txt", ForReading, False)
Do While theFile.AtEndOfstream True
MSGBOX theFile.Readline
Loop
theFile.Close

returns the output as::
This is a test1.
This is a test2.

This is a test3.

21/03/2015

Question of the day:
what is the issue in below script??
SystemUtil.Run "C:\Program Files\\Internet Explorer\iexplore.exe"

15/03/2015

QTP Tips:

Copy and Paste data from Clipboard during a test run:-

You can use the Clipboard object to copy, cut, and paste text during a QuickTest test run.
The Clipboard object 's Methods are
Clear
GetData
GetFormat
GetText
SetData
SetText

Below is an example of Clipboard object usage:

Set MyClipboard = CreateObject("Mercury.Clipboard")
MyClipboard.Clear
MyClipboard.SetText "TEST"
MsgBox MyClipboard.GetText

11/01/2015

QTP Tips:
'Calling multipe QTP scripts using VBscript file:

Function RunMultiple()


Dim qtApp
Dim qtTest
Dim qtResultsOpt

Set qtApp = CreateObject("QuickTest.Application")
arrColl = Array(“C:\filename1″, “C:\filename2″,”C:\filename3″)
For each arrTest in arrColl
qtApp.Open arrTest
set qtTest = qtApp.Test
set objResultsOptions = CreateObject(“QuickTest.RunResultsOptions”)
objResultsOptions.ResultsLocation = arrTest & “\Res1″
qtTest.Run objResultsOptions
qtTest.Close
Next

End Function

Address

Ghaziabad
201306

Alerts

Be the first to know and let us send you an email when Think Only Automation posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Think Only Automation:

Share