I have now been working with Siebel apps on and off for about 6 months now and I feel that even though there is a great wealth of information available on other technologies, there was very little information available for automating Siebel apps with QTP. I don’t consider myself an expert nor do I feel that the techniques in this and coming articles are ‘best practices’; but, my goal is to share what I did and as always, if you have more efficient ways of performing tasks outlined in any articles here, then I would surely like to hear them!
Introduction
- See QTP Reference for:
- Siebel Test Automation-> AutoOn Token
- Siebel Test Automation-> Setting Siebel Record and Run Options
- Siebel Test Automation-> SiebAutomationAccessCode property (optional)
- Siebel Test Automation-> SiebAutomationRequestTimeout property (optional)
- See the ‘SetTimeOut’ property of the SiebApplication object (Configure the advanced timeout and access settings specific for the Siebel 7.7 application)
- See the ReadMe file for known limitations. Adding to the list of limitations:
- With SiebList, sorting does not work for columns not displayed on the screen. This affects all columns that are accessed using the horizontal slider.
- With SiebList, the columns displayed by the horizontal slider cannot be accessed directly.
- Siebel Test Automation data-sheet at Oracle.com contains the latest information on Siebel objects (optional).
- Do not load the Web Add-in with the Siebel add-in loaded. The Siebel Add-in accounts for both.
Unlike some other environments, we cannot bypass the parent to reach the child in the object hierarchy. We must create descriptions for each object in the hierarchy if we are using DP. If you record, you will automatically see the entire object hierarchy. Please see the code below for explanation (the page object was not included in the object hierarchy):
''''Web 'Correct: 1. Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set "AdvancedQTP" 'Correct (without the page object defined in the hierarchy): 2. Browser("title:=Google").WebEdit("name:=q").Set "AdvancedQTP"
With Siebel, if an action is to be performed on the SiebList (which is an immediate child of SiebApplet):
''''Siebel 'Correct: 1. SiebApplication("").SiebScreen("").SiebView("").SiebApplet("").SiebList("").Event 'Incorrect: 2. SiebApplication("").SiebList("").Event 3a. SiebApplication("").SiebScreen("").SiebApplet("").SiebList("").Event 3b. SiebApplication("").CurrentSiebScreen.SiebApplet("").SiebList("").Event 4a. SiebApplication("").SiebView("").SiebApplet("").SiebList("").Event 4b. SiebApplication("").CurrentSiebView.SiebApplet("").SiebList("").Event
StrictSync
By default, the default wait time for performing an action on any Sieb object is 2 seconds. This is controlled by StrictSync. You can read more about it at HP’s KB, and to increase performance, also set it to 0. Below is how you set the value of StrictSync to 0:
Setting.Packages.WebPackage.Settings("StrictSync") = 0
AutoOn Token
The user must append ‘SWECmd=AutoOn’ to the URL for the Siebel Web Engine to to generate test automation information for the Siebel application. Please see below:
The following URL:
-> http://yourHostName/start.swe?{someLongString}
must be:
-> http://yourHostName/start.swe?SWECmd=AutoOn
Server Configuration
The following 2 entities must be set to ‘True’:
- EnableAutomation = TRUE
- AllowAnonUsers = TRUE
Siebel Test Automation Overview and Resolutions
[Update Feb 19, 2010: Reported by and Credits to Todd Mescher]: This post at Oracle Blogs also provides numerous resolutions to issues dealt in the Siebel environment.
References
This post is updated often so be sure to check back at a later date.
If you have any questions, please ask them in the comments section. If your query is confidential, please use the Contact Form to send me an e-mail instead.
{ 29 comments… read them below or add one }
Hi Anshoo,
Can u pls throw some light on following queries
as we are using QTP8.0 no support is given and i did lot of search in Google not much info on QTP,Siebel so had to ask u
1.what are the challenges faced by testing team (manual,automation) after upgrading siebel from 7.7 to 8.0
2.Will the QTP scripts converted from (8.0) to (10) work fine when run on sieble 8.0 or does it involve Rework or will the QTP scripts developed on 8.0 just run fine on siebel 8.0 as QTP 8.0 supports siebel 7.7 and latter.
3.I think upgrading qtp 8.0 to QTP 10 is so expensive as we need to upgrade Test Director to QC as well….
Thanks in advance
Hi Suni,
1. We just updated our Siebel to 7.8 from 7.7. I don’t think any of my scripts were impacted due to this upgrade. However, I’m not sure if the same would apply to 8.0, but my best guess would be that there shouldn’t be much maintenance required for this upgrade, if any.
2. QTP 10 and 8 are 2 versions that are way apart and there were several new functionalities added between these 2. However, my guess would be that there should not be a lot of work required. Again, I am guessing here because we’re still using 9.5 and version 10 will be deployed here in the first week of December. We usually don’t do a mass replace of versions here until most of the critical issues are sorted out in our sandbox environment.
3. I can’t really say much about this, but yes, these tools do cost a lot.
But before your team takes any decision, I would HIGHLY recommend you to get in touch with one of the HP reps and take their advise in this matter. Since we are not using Siebel 8.0 or QTP 10.0, I think that should be the best course of action and I would hate to give any sort of advise that would affect your work negatively. You may also contact some community members who work for HP – they can be found at AdvancedQTP Forums and SQAforums. Good luck :)
Hi Anshoo,
Thanks a lot for ur valuable inputs.i am very grateful to you. ur timely reply helped me a lot in conveying the same to my manager.. and the credit goes to u as i refered the same link to my manager.Its a very along and huge process, right now we are just checking siebel vanilla(8.0) using QTP 8.0 .Will update if we are succesfull in Upgarding.
Cheers
Suni..
That would be great, Suni. Thanks :)
Hi,
We have installed Siebel 7.7and QTP9.5 with Siebel addin. We are unable to find the “EnableAutomation” in any of the cfg files.We are able to find “EnableWebClientAutomation”. But setting this to true is not serving any purpose for us.Please help us how to find the Siebel Test Automation Model. Is there something which needs to be installed where Siebel is installed. Please give us more information on this.
Hi Pavan,
It was a typo there, concerning EnableAutomation (which I just corrected). It’s actually EnableWebClientAutomation and it can be found under siebel.cfg or uagent.cfg. Apart from this, AllowAnonUsers must also be set to true. Once this is done, restart your Siebel server which will prepare it for test automation.
Also, you must have the AutoOn flag set in the URL. This is an absolute must to begin testing.
Thanks all, We were able to resolve the issue. Added to all the above steps make sure you have Auto_AX_…. (Something like this) process is up and running. Thanks again to Anshoo. Hope we may meet couple of time again for some for mutual help. (pavanturlapati@gmail.com)
Hi Anshoo,
Just want to update findings regarding the settings for Siebel 8.1 Automation.The siebel 8.1 will not pick the two parameters from the CS.cfg configuration file on server instead it can be set by logging in to the server as ADMIN
Navigate Sitemap->Administration Server Management->Servers>Components->Select object Manager and click on the Parameters tab in the bottom applet.
Query for the below Parameters and set the Value as TRUE
EnableAutomation = TRUE
AllowAnonUsers = TRUE
Restart the Siebel services.
The rest of the settings like appending SWECmd=AutoOn to URL,Adding License Key and the verification of SiebelAx_Test_A process running on client machine remains same.
Thanks
Suni
Thank you, Suni! One of my colleagues from my old client has been having some issues with Siebel lately and I also forwarded this information to him. Thanks!
There is also a good post here about Siebel: http://blogs.oracle.com/aamat/2009/09/siebel_test_automation.html
Hi Anshoo,
We have upgraded sibel from 7.7 to 8.1.The automation suite that we developed old version (qtp 8.0)is running fine on new Version other than few changes.
The problem is i am not able to record on new version.I am able to spy on the objects so thought of adding Objects ,am able to add buttons and form applet objects ,am unable to add List Applet columns but the List Applet columns are not showed in the object repository
When the Suite is running fine on the new version why is not recording the objects .please kindly help.i am not aware of this strange behaviour.
Thanks
Suni
Hi Suni,
I’m not sure what could be the exact reason for this error, but you can try one of the few troubleshooters mentioned here: http://blogs.oracle.com/aamat/2009/09/siebel_test_automation.html
My colleague had a similar issue, and they had to update the license key in order to make it to work. One of the suggestions there triggered something with the Siebel admin and their issue was resolved. If it still doesn’t work, we can try doing some more research.
Hey,
List applet objects cannot be added manually. Record the script and see that it not only generates the script but also has your objects into OR. Also note that , you cannot do any descriptive programming on List Applet.
Hi Pavan,
Thanks for sharing your experience with us :)
The limitation you mentioned is caused by the CAS API. This thread details the reasons why this limitation occurs and provides a bit of background into this problem.
Hi Guys,
Just wanted to check if QTP 9.5 supports Siebel 6.0. When I used the object Spy it is showing as WinObject. Any help is highly appreciated.
Also, for the list applet, I remember Anshoo shared some valuable information. Lately thanks for that Anshoo.
Hi Pavan,
It depends on the version of your add-in. I haven’t worked with Siebel 6.0, and looking at this article, it seems like it is a Windows application as opposed to the Web interface we generally see.. I think contacting HP support or posting on a QTP forum would probably give you the answer you are looking for.
Hi,
We have developed some scripts on Siebel 7.5 version by selecting the option siebel eBusiness 7.5/7.0 in Record and Run Settings.The script generated is like a normal web application as shown below
Browser("Siebel eConsumer Goods").Page("Siebel eConsumer Goods").Frame("Siebel eConsumer Goods").Image("Site Map").Click Browser("Siebel eConsumer Goods").Page("Siebel eConsumer Goods").Frame("Customer/My Customers").SblTable("Customers").SelectCell 2,"Type",as anshoo said it depends on the version of your Add-in
Thanks
Suni
Hi Anshoo,
How to get the Rowid of a siebel record .The menu option About Record wil give the rowid.But how to get the value .I generally use method
Browser("SiebWebPopupWindow").Page("SiebWebPopupWindow").Frame("_swepopcontent Frame").Object.getElementByID("s_0_1_10_0").innerTextwhere (“s_0_1_10_0″). is the span id of the siebel View to get the view name
As span id for the view is constant every time i navigate to different view, the view name can be retrieved dynamically
but in case of siebel record the span id changes for every record hence am not able to retrieve Row# dynamically.
Any work around….
Thanks Suni
Hi Suni,
Unfortunately, I am not able to get access to any Siebel applications, but as soon as I do, I will post my observations here. I hope you figure out a way around this soon.
Suni,
Hello! How have you been?
I’ve been automation a Siebel Application again. Have you been able to resolve this?
Hi Anshoo,
Hope u r doing good. I was busy running and updating old suites so cudn’t visit the site for long time.I am happy to know that u r going to automate siebel application.Will defenitely post new queries on Siebel Automation
Thanks
suni
Sure :)
Hi Anshoo,
How to retreive the visible text from the sibel dialog box.Getvisibletext property is failing when i run on new Siebel version.
When i spy on the text it is showing as static.the siebel massage looks like this
“The value ‘5′ for field ‘Number Of Face Ons’ is required to be ‘=0′.
Please enter a value that is ‘=0′.(SBL-DAT-00521)
The function i used is as below
compMessage=The message mentioned above set obj = Browser("Siebel Consumer Goods").Dialog("Siebel") Call ModalCheck(Obj,desc,compMessage,"M") Function ModalCheck (modObj,description,compMessage,lneTpe) getMessage=modObj.GetVisibleText(1,1,0,0) appMessage=getMessage getMessage= Replace(getMessage, " ", "") getMessage= Replace(getMessage, "?", "") getMessage= Replace(getMessage, "'", "") getMessage= Replace(getMessage, ".", "") if (getMessage"") then posn=Instr ( 1,getMessage,"(SBL") if (posn=0) Then posn=Instr ( 1,getMessage,"OK") end if if (lneTpe="M") then 'getMessage=Ucase(Trim(Mid (getMessage,9,posn-11))) getMessage=Ucase(Trim(Mid (getMessage,1,posn-3))) elseif (lneTpe="S") then getMessage=Ucase(Trim(Mid (getMessage,9,posn-9))) end if compMessage= Replace(compMessage, " ", "") compMessage= Replace(compMessage, "?", "") compMessage= Replace(compMessage, "'", "") compMessage= Replace(compMessage, ".", "") compMessage= Ucase(Trim(compMessage)) end if If (getMessage=compMessage) Then Reporter.ReportEvent 0,desc, "It behaves as per the requirement" Else Reporter.ReportEvent 1,desc, "It doesn't behave as per the requirement" End If End FunctionNow when i debug the length of both the compmessage and getmessage is different .is there any standard way of testing the siebel dialog error messages.
Suni,
What creates this Dialog? I mean, is there a button that you click that opens this Dialog box? There is a workaround for this issue – which occurs due to synchronization with the Siebel app. I wrote the workaround a few months back and it can be found here.
If you can share the code before the opening of the Dialog box, I think it will become quite easy to troubleshoot this.
Hi Anshoo,
The suite i was running is for regression testing that handles some negative scenarios.
Here the code is just to enter the Field values as below
SiebObj.SiebList("List").SiebCalculator("No. of Facings").SetText facings SiebObj.SiebList("List").SiebCalculator("Number Of Face Ons").SetText faceonswhere the Number Of Face Ons value is greater than Number Of Facings on saving the error message pops up.
I have many dailog boxes handled in the suite where all the validations failed though the dialog messages are same in both the versions
When i Debug the values in both get and comp messages are different as compmessage value is taking either starting from 2nd character or the last character is missing depending on the lneType i was just looking for Any DP for static object
i got the value using geropoeprty
Browser("Siebel Consumer Goods").Dialog("Siebel").Static("hwnd:=9124533").getroproperty("gerexpwintitle")but again it wil fail as the property is not constant for all dialog boxes.i want to replace the function that works for all dialog boxesIf the above code is what creates the Popup, then it might be quite a tough scenario to handle. This is primarily due to the inclusion of Siebel List object, which is an enormous headache. Siebel List is also the reason why I execute a lot of queries and retrieve all values from the Form Applets.
Try one of these for all Dialog boxes:
Browser("title:=.*Siebel.*").Dialog("text:=.*Siebel.*").Static("").GetROProperty("") Browser("title:=.*Siebel.*").Dialog("text:=.*").Static("").GetROProperty("") Browser("title:=.*Siebel.*").Dialog("micclass:=Dialog").Static("").GetROProperty("") Browser("title:=.*Siebel.*").Dialog("nativeclass:=#32770"").Static("").GetROProperty("")Also, you are using the
windows handlefor Static: doesn’t it change every time you execute your code?Hi Anshoo,
yes the windows handle property is changing everytime but that the only property of static (as a work around )where i am able to retrieve the text otherwise qtp is not identifying the static object.
Hi Anshoo,
I was wondering if it is possible to make Siebel objects more modular in QTP…
Say we have:
SiebApplication("").SiebScreen("").SiebView("").SiebApplet("").SiebList("").EventIf we have tests specific to Views or Applets, is it possible to make those first levels into a parameter or object? Something like:
myApplet &.SiebList(“”).Event
or
myView &.SiebApplet(“”).SiebList(“”).Event
This way you could have global functions that can be used across multiple views.
Thanks,
~Dria
Hi Dria,
I suppose you’re looking for a technique like this: http://relevantcodes.com/qtp-working-with-large-object-hierarchies-siebel-objects/
In the past few days, I’ve again got the opportunity to work with a Siebel application and have created another (easier and more efficient) way to work with such object without specifying the entire hierarchy. The technique is still in its testing phase and as soon as I figure out and fix all the issues, it will be released in the same article as above. If you would like to see the technique prior to that, please send me an e-mail at
anshoo[dot]arora[at]relevantcodes[dot]com.Cheers :)
Hi Anshoo,
There are some great techniques in that article. I will play around with them and let you know how it goes. Your site is very helpful and an excellent resource. I look forward to seeing your new solution.
Thanks!
~Dria