Mercury gives us SAFFRON
Last week, Mercury posted a file for download called "QTP Expert Series - Issue 1". I saw it today and it interested me enough to download it. I'm certainly glad I did, because inside I found a spicy* little example framework called SAFFRON (Simple Automation Framework For Remarkably Obvious Notes).
SAFFRON is far from being a ready-to-use framework, but it does provide some good example code for creating an easy to read and write meta language that doesn't use an Object Repository. It is similar in concept to what the Inquisitors have been working on ... except a lot more light weight.
Here is an example from the SAFFRON FAQ:
QuickTest Script:
Visual Basic:
Browser("Google").Navigate "http://google.com/" Browser("Google").Page("Google").WebEdit("q").Set "Hello World!" Browser("Google").Page("Google").WebButton("Google Search").Click Browser("Google").Page("Hello World! - Google").Link("Hello, World Page").ClickSAFFRON Script:
Visual Basic:
BrowseTo "http://google.com/" EnterTextIn "q", "Hello World!" Activate "WebButton", "Google Search" Activate "Link", "Hello, World Page"
SAFFRON is extremely limited, but it is a step in the right direction. And it is good to know there is at least one person at Mercury who is doing some innovative thinking on test frameworks instead of focusing on how to apply the latest buzzword to the same old record and playback tests.
You can download SAFFRON on Mercury's support site or through this direct link.
* spicy...saffron...get it?
Tags: Framework, Object Repository, QTP 9, QTP-9.1, QTP-9.2, QuickTest-Pro-9.2


November 23rd, 2006 at 11:01 am
It seem to be a good approach.
But How about the concept of Inquisitors have been working on..?
Could you show some ideas & code…?
Reply to Andy
February 6th, 2007 at 11:30 am
Hi,
I have created a userdefined object.just i want to know that how can i access its properties.
”************************************************************************************************************************
‘Description:
‘
‘This example opens QuickTest and creates a user-defined object of class “MyCustomListView”, which is mapped to
‘a WinListView test object. Once the object is mapped, the settings for mandatory, assistive, and smart
‘identification properties are set just as they would be for any regular test object class.
‘Assumptions:
‘QuickTest is not open.
‘************************************************************************************************************************
Dim qtApp ‘As QuickTest.Application ‘ Declare the Application object variable
Dim qtOptions ‘As QuickTest.WindowsAppsOptions ‘ Declare a Windows Application Options object variable
Dim UserDefObj ‘As Object ‘ Declare a user-defined object variable
Set qtApp = CreateObject(”QuickTest.Application”) ‘ Create the Application object
qtApp.Launch ‘ Start QuickTest
qtApp.Visible = True ‘ Make the QuickTest application visible
Set UserDefObj = qtApp.Options.ObjectIdentification(”WinComboBox”).CreateUserDefinedObject(”mck.common.controls.mylookupeditor”) ‘ Create a user-defined object.
UserDefObj.OrdinalIdentifier = “location” ‘ Set the selector type for the created user-defined object
UserDefObj.MandatoryProperties.RemoveAll ‘ Clear the MandatoryProperties list.
‘ Create a new MandatoryProperties list
UserDefObj.MandatoryProperties.Add (”attached text”)
UserDefObj.MandatoryProperties.Add (”nativeclass”)
UserDefObj.AssistiveProperties.RemoveAll ‘ Clear the AssistiveProperties list.
‘ Create a new AssistiveProperties list
UserDefObj.AssistiveProperties.Add (”window id”)
UserDefObj.AvailableProperties.Add(”Select”)
UserDefObj.AvailableProperties.Add(”GetItem”)
‘ Clear the smart identification settings.
UserDefObj.EnableSmartIdentification = False
UserDefObj.BaseFilterProperties.RemoveAll
UserDefObj.OptionalFilterProperties.RemoveAll
Set UserDefObj = Nothing ‘ Release the user-defined object.
Reply to Narendra Singh
February 13th, 2007 at 10:57 am
Hi
I have run this script and it automatically creates a user defined object. So when I add that object in repository it recognized as combo box.
Narendra Singh
Reply to Narendra Singh
May 4th, 2007 at 6:08 am
I am a regular visitor to this wesite. This is a very good article on object repositories.
please keep on poting such great and informative articles on QTP.
sachin
http://qtp.blogspot.com
Reply to sachin