preload

Using built-in and system dialogs in QTP

Posted by Albert Gareev on Nov 19, 2009
0
Even though automated testing scripts are intended to communicate with application under test there are cases when communication with tester is required. With QTP, we can use either built-in MsgBox / InputBox functions or link standard Windows dialogs through COM. MsgBox Use this function to report information (like value of a variable) during debugging or […] ...

QTP-XML service functions (7) – Add processing ...

Posted by Albert Gareev on Nov 15, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description This particular example demonstrates adding XSL call that contains instructions transforming XML tree to a web-page (HTML). Built-in QTP support for XML does not provide mapping for XML methods that operate special nodes, like Processing Instructions. It can be done through Microsoft XML DOM object. ...

QTP-XML service functions (6) – ...

Posted by Albert Gareev on Nov 14, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description Uses .AddChildElementByName method to create a child XML node, then returns reference to the newly created object. If Parent XML node is not defined returns “Nothing”. ...

GP/QTP Automation: Highlight controls in Dexterity ...

Posted by Albert Gareev on Oct 26, 2009
0
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 VBScript function – put as Dexterity Interface Class method Note. If you use it as an embedded function don’t […] ...

How to separate file name and path (QTP, VBScript)

Posted by Albert Gareev on Oct 25, 2009
3
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 […] ...

How to check if file exists (QTP, VBScript)

Posted by Albert Gareev on Oct 24, 2009
2
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 […] ...

How to open Excel workbook (QTP, VBScript)

Posted by Albert Gareev on Oct 17, 2009
0
Parent page: Service Functions – Excel (QTP, VBScript) Description Check the file exists – Create an instance of Excel by using COM – open (load) file ...

GP/QTP Automation: GUI Capture script for Dexterity ...

Posted by Albert Gareev on Oct 12, 2009
6
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 […] ...

Service Functions – XML (QTP, VBScript)

Posted by Albert Gareev on Oct 02, 2009
0
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 […] ...

Service Functions – String (QTP, VBScript)

Posted by Albert Gareev on Oct 01, 2009
2
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)   Replace pattern(s) in a string Number conversion and initialization with a default value   Initialize string with […] ...

GP/QTP Automation: interface class for Excel.VBA macro

Posted by Albert Gareev on Sep 25, 2009
0
All related posts: Reference Page – GP/QTP Automation  The following object implements interface from QTP side. Function Libary Source Code Used resources: Service Functions – String (QTP, VBScript) Declare and initialize: ...

GP/QTP Automation: Overcoming VBScript limitation with ...

Posted by Albert Gareev on Sep 23, 2009
2
All related posts: Reference Page – GP/QTP Automation   VBScript limitation  Since VBscript supports only Variant type attempts to use variable in a COM call with an argument defined as “[in, out] BSTR * “ reasonably end with “Type mismatch” error. This error is generated by the COM object itself rather then VBscript interpreter since the object gets string […] ...

GP/QTP Automation: Executing sanScript

Posted by Albert Gareev on Sep 21, 2009
0
All related posts: Reference Page – GP/QTP Automation   General concept The Application object provides only a few methods for simulation of GUI interaction required in Test Automation. However, ExecuteSanScript method allows overcoming of that limitation. The piece of sanScript code pre-written or dynamically generated could be passed-in to Microsoft Dynamics GP runtime engine, and compiled and executed […] ...

GP/QTP Automation: GUI Mapping script

Posted by Albert Gareev on Sep 09, 2009
0
All related posts: Reference Page – GP/QTP Automation   Purpose: extract object descriptions from Dexterity Dictionary and create custom XML-based GUI Map file for QTP. Used resources: Service Functions – XML (QTP, VBScript) ...

GUI object synchronization – custom function ...

Posted by Albert Gareev on Aug 20, 2009
0
Custom function implementing a more advanced synchronization point. The function will wait for the object to become existing and enabled, or to disappear (not existing). The maximum time to wait could be defined or taken by default. Used resources: Anti sleep function (QTP, VBScript, MercuryTimer, DeviceReplay) Service Functions – String (QTP, VBScript) ...

Anti sleep function (QTP, VBScript, MercuryTimer, ...

Posted by Albert Gareev on Aug 18, 2009
6
Sometimes a PC goes to sleep, launches screensaver or locks the desktop during a long synchronization periods or other GUI inactivity periods. Adding the function below makes the script periodically moving mouse to avoid breaking of the execution. Place the call to the function within your time-consuming loops and custom synchronization functions. To improve performance […] ...

Service Functions – DotNetFactory (QTP, VBScript)

Posted by Albert Gareev on Aug 05, 2009
0
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. Creating Custom Dialog DotNetFactory interface functions – create custom dialog  Creating DotNetFactory GUI Objects DotNetFactory interface functions (1) – Create Button DotNetFactory interface functions (2) – Create Label DotNetFactory […] ...

QTP-XML service functions (5) – ChildCommentValue

Posted by Albert Gareev on Jul 21, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description Retrieves child comment node from comments collection and returns comment text as string. ...

QTP-XML service functions (4) – ...

Posted by Albert Gareev on Jul 17, 2009
0
Parent page:  Service Functions – XML (QTP, VBScript)  Description Returns scalar value of the XML child attribute specified by a name. Attribute name duplication within the same node is not allowed by XML rules. If there is no attribute with the name specified then “” (empty string) is returned. ...

QTP-XML service functions (3) – ChildAttributeByName

Posted by Albert Gareev on Jul 16, 2009
0
Parent page: Service Functions – XML (QTP, VBScript)  Description Returns XML child attribute (as XMLAttribute object reference) specified by a name. Attribute name duplication within the same node is not allowed by XML rules. If there is no attribute with the name specified then “Nothing” is returned. ...

QTP-XML service functions (2) – ...

Posted by Albert Gareev on Jul 15, 2009
0
Parent page:  Service Functions – XML (QTP, VBScript)  Description Returns scalar value of the XML child node specified by an xml tag name. If there are multiple objects with the same tag, returns value of the first reference. If there are no objects with the tag specified returns “” (empty string). ...

QTP-XML service functions (1) – ...

Posted by Albert Gareev on Jul 14, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description Returns XML child node (as XMLElement object reference) specified by an xml tag name. If there are multiple objects with the same tag, returns the first reference. If there are no objects with the tag specified returns “Nothing”. ...

DotNetFactory interface functions – create ...

Posted by Albert Gareev on Jun 18, 2009
2
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Used resources Service Functions – String (QTP, VBScript) Implementing optional and default parameters Create TextBox along with the Prompt Label and place on the GUI Form Create ComboBox along with the Prompt Label and place on the GUI Form Create Button, assign the event, and place on the GUI […] ...

DotNetFactory interface functions (6) – Create ...

Posted by Albert Gareev on Jun 17, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a basic Form and assign required properties within one line by calling the function below. The function has one mandatory parameter (which though is initialized by default if empty) and a set of optional parameters provided in the Dictionary object. […] ...

DotNetFactory interface functions (5) – Create ...

Posted by Albert Gareev on Jun 16, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a ComboBox (Dropdown Listbox/InputBox Object) and assign required properties within one line by calling the function below. The function has one mandatory parameter (list of available selection items – packed in the Dictionary object) and a set of optional parameters […] ...

DotNetFactory interface functions (4) – Create ...

Posted by Albert Gareev on Jun 15, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a CheckBox and assign required properties within one line by calling the function below. The function has one mandatory parameter (which though is initialized by default if empty) and a set of optional parameters provided in the Dictionary object. Currently […] ...

DotNetFactory interface functions (3) – Create ...

Posted by Albert Gareev on Jun 14, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a TextBox (single-line Text Input object) and assign required properties within one line by calling the function below. The function has only optional parameters provided in the Dictionary object. Currently supported optional parameters: TextBox Width and Height. TextBox Coordinates – […] ...

DotNetFactory interface functions (2) – Create ...

Posted by Albert Gareev on Jun 13, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a label and assign required properties within one line by calling the function below. The function has one mandatory parameter (which though is initialized by default if empty) and a set of optional parameters provided in the Dictionary object. Currently […] ...

DotNetFactory interface functions (1) – Create ...

Posted by Albert Gareev on Jun 12, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a button and assign required properties within one line by calling the function below. The function has one mandatory parameter (which though is initialized by default if empty) and a set of optional parameters provided in the Dictionary object. Currently […] ...

Text File compare in “WDIFF” style (QTP, ...

Posted by Albert Gareev on May 27, 2009
0
Original date: N/A The post has been mostly recompiled from the comments. Displaying Text File comparison results in an embedded report. Refer to Text File Compare functions used to see how XML file is generated. Sample requirements to show comparison results stored in XML as a web-page (HTML). 1. Show file stats saved in xml file. […] ...
Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.