preload

TestComplete Forms – Using Custom Events

Posted by Albert Gareev on Apr 17, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). [...] ...

TestComplete – “UserName/Password” Form

Posted by Albert Gareev on Apr 16, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). [...] ...

TestComplete – Using ‘File Open’ ...

Posted by Albert Gareev on Apr 10, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). [...] ...

Adding GUI forms in TestComplete project

Posted by Albert Gareev on Apr 09, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). [...] ...

GetTokenByKeyword (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Mar 06, 2012
0
Parent page: Service Functions – String (QTP, VBScript) Description Get token string from the source string. Position is relative, defined by another token-keyword and a number. Implementation Public Function GetTokenByKeyword(ByVal strSource, ByVal chrDelimiter, ByVal strKeyword, ByVal intNumber, ByRef strToken) Dim Tokens, intCount, intIndex Dim i, boolRC Tokens = Split(strSource, chrDelimiter) intCount = UBound(Tokens)+1 intIndex = [...] ...

GetTokenByNumber (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Mar 05, 2012
0
Parent page: Service Functions – String (QTP, VBScript) Description Get token string from the source string. Position is absolute, defined by number. Implementation Public Function GetTokenByNumber(ByVal strSource, ByVal chrDelimiter, ByVal intNumber, ByRef strToken) Dim Tokens, intCount strSource = ReplaceEx(strSource, " *", " ", False) Tokens = Split(strSource, chrDelimiter) intCount = UBound(Tokens) If intNumber > ...

CopyChildElements (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Dec 08, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Copy all child elements (and attributes, comments, text nodes) from one XML node to another. Implementation Public Function CopyChildElements(ByRef objXMLSrc, ByRef objXMLDest)    Dim objCloneNode      If objXMLSrc is Nothing Then     Set MoveChildElements = objXMLDest     Exit Function    End If    If [...] ...

MoveChildElements (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Dec 06, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript)   Description Move all child elements (and attributes, comments, text nodes) from one XML node to another.  Implementation Public Function MoveChildElements(ByRef objXMLSrc, ByRef objXMLDest)    If objXMLSrc is Nothing Then     Set MoveChildElements = objXMLDest     Exit Function    End If    If objXMLDest is Nothing Then     [...] ...

How to select random list item (QTP, VBScript)

Posted by Albert Gareev on Nov 24, 2011
0
Description  Get object reference. Get total number of items in the list. Generate an index within the given range. Select item by index. Implementation Dim objPage, objList Dim boolRC Dim intItemsCount, intRndItem 'Assumptions: ' "Google Advanced Search" page is up ' "Results per page" WebList exists and enabled 'Get page object Set objPage = Browser("CreationTime:=0").Page("title:=Google Advanced ...

XMLElementDepth (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Oct 20, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Locate XML node depth within the hierarchy. Valid argument: an XML element node (NODE_ELEMENT type).  Implementation Public Function XMLElementDepth(ByRef objXMLElement)    Dim intDepth    Dim objXMLNode   If objXMLElement is Nothing Then   XMLElementDepth = -1   Exit Function  End If  'NODE_DOCUMENT(9)  If objXMLElement.NodeType = 9 Then ...

CreateXMLDOMFromString (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Oct 08, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Description Create XML DOM object by loading source XML from string. If the string is empty or source XML is invalid returns Nothing. Implementation Public Function CreateXMLDOMFromString(ByVal sXMLSource)   Dim boolRC, intRC   Dim objXMLDoc, objXMLRoot     If Trim(sXMLSource) = "" Then     Set CreateXMLDOMFromString = Nothing     Exit [...] ...

How to find last modified file (TestComplete, QTP, ...

Posted by Albert Gareev on Jul 26, 2011
2
Reference page: Service Functions – System (QTP, VBScript) Description  Check folder exists – check folder has files. Iterate through collection of files and keep reference of the most recently modified file (its DateLastModified property is always the highest number). The remaining reference is the one that you need. In case of errors the function returns [...] ...

XMLNodeSet2Dictionary (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Jul 20, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Service Functions – Dictionary (QTP, TestComplete, VBScript) Description For each occurrence of XML node perform conversion to Dictionary, and store all records in indexed Dictionary object. Implementation Public Function XMLNodeSet2Dictionary(ByRef objXMLNodeSet)   Dim objDictionary   Dim Iter   Set objDictionary = CreateObject("Scripting.Dictionary")  If ...

XMLNode2Dictionary (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Jul 19, 2011
0
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript) Service Functions – Dictionary (QTP, TestComplete, VBScript) Description Create Dictionary object and populate with data (only direct content – text, comments, CData, and attributes) taken from XML node. Naming convention: @attr_name for attributes; #text_index for text nodes; #comment_index for comment nodes; #cdata_index for CData Section nodes. [...] ...

Generating Test Reports: Final Example

Posted by Albert Gareev on Jun 23, 2011
0
Parent page: Generating Test Reports Today I put all examples together.  Here’s our XML record simulating log data of a test session. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\LogView4.xsl"?> <log> <area id="A001"> <description>Testing login page, invalid password</description> <step type="#note" ...

Exploring options for Expand/Collapse (HTML, ...

Posted by Albert Gareev on Jun 14, 2011
0
Parent page: Generating Test Reports Today’s post is a little bit of a side mini-project within the test reports theme. What I wanted is to add more structure in test logs, but made it summarized. So I went to explore about simple approaches in that. Very often, on static pages (without AJAX) the approach used is [...] ...

XML/XSL Transformation: Using Styles

Posted by Albert Gareev on May 25, 2011
0
Parent page: Generating Test Reports Let’s now take the examples from the previous post, and add more style.  Here’s our XML record simulating log data of a test session. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\LogView3.xsl"?> <log> <step type="#note"> <time>21/04/2011 11:45:31 AM</time> ...

XML/XSL Transformation: Using Sub-Templates

Posted by Albert Gareev on Mar 14, 2011
3
Parent page: Generating Test Reports Today I continue with more complex examples using previously demonstrated XSL parsing nodes grouped into sub-templates. Here’s our XML record simulating log data of a test session. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\LogView2.xsl"?> <log> <step type="#note"> ...

XML/XSL Transformation: Tree to Table

Posted by Albert Gareev on Mar 04, 2011
1
Parent page: Generating Test Reports Today I present XML Tree to HTML Table transformation example. Here’s our XML record simulating logged test steps. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\Tree2Table.xsl"?> <log> <step type="GUI Step"> <description>Pasted data [User1234] in edit box [Username] ...

XML/XSL Transformation: Using Complex Nodes

Posted by Albert Gareev on Mar 03, 2011
0
Parent page: Generating Test Reports Today I present example on dynamically building HTML nodes, with XSL, and from XML data. Here’s our XML record simulating log data of a test session. XML Source <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href=".\LogView1.xsl"?> <log> <step type="GUI Step"> <time>21/04/2011 11:45:31 AM</time> ...
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.