Posted by Albert Gareev on Oct 08, 2011
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 Test Code ...
Posted by Albert Gareev on Jul 26, 2011
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 […] ...
Posted by Albert Gareev on Jul 20, 2011
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 ...
Posted by Albert Gareev on Jul 19, 2011
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. […] ...
Posted by Albert Gareev on Jun 23, 2011
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 The following line <?xml-stylesheet type=”text/xsl” href=”.\LogView4.xsl”?> instructs the web browser to use XSL script for visualization of XML data. Web-page Report And here’s the source code of the script XSL Source […] ...
Posted by Albert Gareev on Jun 14, 2011
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 […] ...
Posted by Albert Gareev on May 25, 2011
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 Did you notice the following line? <?xml-stylesheet type=”text/xsl” href=”.\LogView3.xsl”?> This is how we instruct the web browser to use XSL script for visualization of XML data. […] ...
Posted by Albert Gareev on Mar 14, 2011
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 Note that the structure of XML file is not identical to the previous examples. It has more complexities and dependencies that need […] ...
Posted by Albert Gareev on Mar 04, 2011
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 Did you notice the following line? <?xml-stylesheet type=”text/xsl” href=”.\Tree2Table.xsl”?> This is how we instruct the web browser to use XSL script for visualization of XML data. Web-page Report And here’s […] ...
Posted by Albert Gareev on Mar 03, 2011
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 Did you notice the following line? <?xml-stylesheet type=”text/xsl” href=”.\LogView1.xsl”?> This is how we instruct the web browser to use XSL script for […] ...
Posted by Albert Gareev on Mar 02, 2011
Parent page: Generating Test Reports Today I present example of an HTML Table populated with XML data. Here’s our XML record simulating stats data of a test session. XML Source Did you notice the following line? <?xml-stylesheet type=”text/xsl” href=”.\StatsTable.xsl”?> This is how we instruct the web browser to use XSL script for visualization of XML […] ...
Posted by Albert Gareev on Jan 06, 2011
Close/Terminate Specified Process Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory – search for local processes by name – iterate through the returned array and close one by one. First attempt – “gentle” close (via CloseMainWindow()). WaitForExit() gives a process some time to finalize, you may customize […] ...
Posted by Albert Gareev on Jan 04, 2011
Check If a Process Exists in Memory Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory – search for local processes by name – return result as boolean. Note. Name is case-insensitive but no wildcards supported. Implementation Examples ...
Posted by Albert Gareev on Dec 13, 2010
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about […] ...
Posted by Albert Gareev on Dec 07, 2010
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about […] ...
Posted by Albert Gareev on Nov 23, 2010
Parent page: GUI Recognition with TestComplete First of all, a short note to those readers who like to rush into conclusions. This post is about a feature, not bug. Here I continue exploring TestComplete GUI recognition capabilities with code example. The previous two posts (here and here) were about Find, FindChild, and FindAllChildren methods. Today I […] ...
Posted by Albert Gareev on Nov 17, 2010
Parent page: GUI Recognition with TestComplete Close, minimize, maximize, move, resize browser window Description A WebForm (Page, Frame, table, etc.) can not be operated same way as window. The first thing function does is iterating upwards the hierarchy to access Process object, which is used to retrieve browser window reference. In the example presented, IEFrame property […] ...
Posted by Albert Gareev on Nov 11, 2010
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about FindAllChildren method If proper selection of GUI recognition properties is challenge number zero for a beginner automation […] ...
Posted by Albert Gareev on Nov 10, 2010
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about Find method We continue with example from the previous post. What happened when the script clicked on […] ...
Posted by Albert Gareev on Nov 09, 2010
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about FindChild method Let’s start with the example. Note highlighted lines: this is where object recognition properties are […] ...
Posted by Albert Gareev on Oct 26, 2010
Parent page: Service Functions – System (QTP, VBScript) Question I need to modify text file template (add a few lines) and “Save as”. Answer One of the typical challenges that people face while trying to automate work tasks, is “procedure – result” confusion. Here, the end result* is confused with a way** to do the […] ...
Posted by Albert Gareev on Oct 18, 2010
“I don’t even see the code anymore; all I see now is blonde, brunette, redhead”, Cypher (Matrix the Movie) Parent page: GUI Recognition with TestComplete Unlike operators from the popular movie, automation engineer sees picture first, but has a need to get inside down to the code. In TestComplete we can do that with Object […] ...
Posted by Albert Gareev on Oct 14, 2010
Parent page: GUI Recognition with TestComplete Close all browser windows Description In the example presented, Internet Explorer browser program (executable name) is hard-coded (as “iexplore”). Closing begins from first instance number (i.e. a sequential number of the process in memory, if a few were loaded). In first attempt, .Close method is used, which allows an application […] ...
Posted by Albert Gareev on Oct 12, 2010
Parent page: GUI Recognition with TestComplete Close single browser window Description In the example presented, Internet Explorer browser program (executable name) is hard-coded (as “iexplore”). Instance number (i.e. a sequential number of the process in memory, if a few were loaded), is parameterized. In first attempt, .Close method is used, which allows an application to finalize. Second […] ...
Posted by Albert Gareev on Sep 23, 2010
To be master of any branch of knowledge, you must master those which lie next to it; and thus to know anything you must know all. Oliver Wendell Holmes, Jr. I have not failed. I’ve just found 10,000 ways that won’t work. Thomas Edison Training and coaching is often a part of my job in automation. […] ...
Posted by Albert Gareev on Sep 07, 2010
Sometimes a PC goes to sleep, launches screensaver or locks the desktop during a long synchronization periods or other GUI inactivity periods, like generation of reports or batch processing. 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 […] ...
Posted by Albert Gareev on Sep 02, 2010
Mind Map Functions Comparison: One-To-One Relationship 1-1 Comparison: isValueEqual 1-1 Comparison: isValueLess 1-1 Comparison: isValueEqualOrLess 1-1 Comparison: isValueGreater 1-1 Comparison: isValueEqualOrGreater 1-1 Comparison: MatchIn / MatchFor Comparison: One-To-Many Relationship 1-N Comparison: isValueInRange 1-N Comparison: isValueInSet Comparison: Many-To-Many Relationship N-N Comparison: isSetEqual N-N Comparison: isRecordEqual N-N ...
Posted by Albert Gareev on Aug 19, 2010
Parent page: Service Functions – String (QTP, VBScript) Description Based on the maximum allowed length of the string (strMsgText) insert space characters. Implementation ...
Posted by Albert Gareev on Aug 12, 2010
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: Many-to-Many / Rule: Match For Set in Another Set Definitions Supported data types: String, Number, Date Supported data structures: Vector Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Vector data structure is presented by a set […] ...
Posted by Albert Gareev on Aug 11, 2010
Reference Page: Comparison Rules Automatic Comparison Rules Relationship: Many-to-Many / Rule: Set Match In [Another Set] Definitions Supported data types: String, Number, Date Supported data structures: Vector Comparison of values of different data types always returns False. Comparison of values of unsupported data types always returns False. Vector data structure is presented by a set […] ...