Posted by Albert Gareev on Oct 26, 2009
SanScript, Visual Basic, and VBScript functions implementing the “Highlight in Application” feature as in QTP Object Repository Manager.
All related posts: Reference Page – GP/QTP Automation
VBA/SanScript function – put in your Excel VBA macro file
Note. Ignores sanScript errors
Public Function HighlightControl()
Dim intRC As Integer
Dim intCount, Iter As Integer
Dim sCode, sErrMsg As ...
Posted by Albert Gareev on Oct 25, 2009
Parent page: Service Functions – System (QTP, VBScript)
Use FileSystemObject.GetFile method to obtain a File object.
Argument should be a full path string.
Set FSO = CreateObject(“Scripting.FileSystemObject”)
Check if the file exists first.
When to use it? There is a variety of utility tasks related to it: get parent folder, create another file in the same folder, create another file with the same name, [...] ...
Posted by Albert Gareev on Oct 24, 2009
Parent page: Service Functions – System (QTP, VBScript)
Use FileSystemObject.FileExists method.
Argument should be a full path string.
When to use it? Always before trying to access the file (delete, rename, or read from).
Does file format matter? No. It could be text file, excel spreadsheet, bitmap, binary file, – anything. Just make sure you pass into both filename and extension.
Note. [...] ...
Posted by Albert Gareev on Oct 19, 2009
Hospital error leads to radiation overdoses
The article: http://www.latimes.com/news/local/la-me-cedars13-2009oct13,0,1200257.story
(…)
Doctors believed it would provide them more useful data to analyze disruptions in the flow of blood to brain tissue.
That meant resetting the machine to override the pre-programmed instructions that came with the scanner when it was installed.
“There was a misunderstanding about an embedded ...
Posted by Albert Gareev on Oct 17, 2009
Parent page: Service Functions – Excel (QTP, VBScript)
Description
Check the file exists – Create an instance of Excel by using COM – open (load) file
Dim XLHandle, XLBook
Public Function OpenWorkbook(ByVal sFileName)
Dim FSO, boolRC
Set FSO = CreateObject("Scripting.FileSystemObject")
boolRC = FSO.FileExists(sFileName)
Set FSO = Nothing
If Not boolRC Then
OpenWorkbook = FALSE
Exit ...
Posted by Albert Gareev on Oct 15, 2009
This is the discussion slowly going on Justin Dessonville’s blog post. With the arguments taken from famous “Testing vs. Checking” article by Michael Bolton it once again reminds me of Luddites.
The Luddites were a social movement of British textile artisans in the early nineteenth century who protested—often by destroying mechanized looms—against the changes produced by [...] ...
Posted by Albert Gareev on Oct 12, 2009
A script capturing Dexterity objects (both GUI and non-GUI) contained within the window. Great Plains application is required to be up with the particular window invoked and activated.
All related posts: Reference Page – GP/QTP Automation
Programming language and tool: VBScript / QTP.
The script produces an output as XML file with the structure similar to QTP object repository.
Used resources:
GPHandle object [...] ...
Posted by Albert Gareev on Oct 05, 2009
Software Testing is an empirical process.
Empirical approach as an opposite to theoretical requires observation, investigation and experimenting.
Results of those actions performed are collected, documented, analyzed, and categorized, before conclusion is made.
A Scientific Method of Learning consists of the collection of data through observation and experimentation, and the formulation and testing of hypotheses. If hypothesis [...] ...
Posted by Albert Gareev on Oct 02, 2009
In the code examples I present I often refer to routine functions. In my framework I have specialized libraries to call from.
In my blog I maintain the similar structure.
Using built-in QTP-XML Objects and Functions
Returns reference of XML Element
Returns text value of XML Element
Returns reference of XML Attribute
Returns text value of XML Attribute
Returns text value of a [...] ...
Posted by Albert Gareev on Oct 01, 2009
In the code examples I present I often refer to routine functions.
In my framework I have specialized libraries to call from. In my blog I maintain the similar structure.
Matching string with a pattern (Regular Expression, RegEx)
Public Function Regex_Test(ByVal strSrc, ByVal strRegEx)
Dim objRegEx
Dim boolRC, intRC
Set objRegEx = New RegExp
objRegEx.Pattern = strRegEx
On Error Resume Next
boolRC = ...