Welcome To Automation Testing

Before starting with tips of automation of SAP using QTP Let me give a small introduction of SAP and QTP.

SAP stands for System Applications and Products. It is the name of both the online financial and

Administrative software and the company that developed it. SAP is made up of individual modules that perform various organizational system tasks.



Quick Test Professional (QTP) is an automated functional Graphical User Interface (GUI) testing tool that allows the automation of user actions on a web or client based computer application.

It is primarily used for functional regression test automation. QTP uses a scripting language built on top of VBScript to specify the test procedure, and to manipulate the objects and controls of the application under test. It supports many applications through the support of add-ins.



We will be using SAP add-in with QTP to work on the SAP automation.

Wednesday 25 July 2012

Launching SAP Using QTP



This is a common problem that most of the beginners face. How to open SAP through QTP?. I thought of posting about this.
There is an utility object from QTP for SAP . It is “SAPGuiUtil”.
SAPGuiUtil supports multiple methods. Below is the list of them with small description.
1.       Autologon -- --   Connects and logs on to an SAP Server
2.       AutoLogonByIP -----   Connects and logs on to SAP server according to its IP address.
3.       CloseConnections-----  Closes any SAP connections that were opened by QTP or by user.
4.       OpenConnection -----   Opens a connection to the specified SAP server.
5.       OpenConnectionByIP ---  Opens a connection to the specified SAP server according to its IP.
Let’s have a look at each one of them.
1. Autologon :  The AutoLogon method opens a new connection even if an open session already exists.
Syntax :
SAPGuiUtil.Autologon <ServerDescription>,<Client>,<User>,<Password>,<Language>
'The following example uses the AutoLogon method to connect to client "800" of the "Calderone" SAP server, using the logon information for the MUSTER user. The Password argument is parameterized to take the encrypted value from the Data Table.
SAPGuiUtil.AutoLogon "Calderone", 800, "MUSTER", DataTable("Password",dtLocalSheet),”EN”

2. AutoLogonByIP : Connects and logs on to an SAP server according to its IP address.
“SAPGuiUtil.AutoLogonByIP <ConnectionString>, <Client>, <User>, <Password>, <Language>, [SystemNumber], [RoutingServers]”
Below is the example
'The following example uses the AutoLogonByIP method to log on to the "Calderone" SAP server
'using its IP address instead of its name.'The Password argument is parameterized to take the encrypted value from the Data Table.
SAPGuiUtil.AutoLogonByIP "/H/212.199.95.5/S/3200", "800", "QA01", DataTable("Password", dtGlobalSheet), "en", "00"

3. CloseConnections  : Closes any SAP connections that were opened by QuickTest or by the user.
                Syntax: SAPGuiUtil.CloseConnections
4. OpenConnection   : Opens a connection to the specified SAP server.
SAPGuiUtil.OpenConnection ServerDescription

Below is an example.

Sapguiutil.OpenConnection “A:Test Server”
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("User").Set strUserID
 SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Password").SetSecure strPassword
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiButton("Enter").Click

5. OpenConnectionByIP : Opens a connection to the specified SAP server according to its IP address.
Syntax: object.OpenConnectionByIP ConnectionString, [SystemNumber], [RoutingServers]
Below is the example.
SAPGuiUtil.OpenConnectionByIP "10.168.11.57", 0

Hope this would help my readers. Please note this reference was taken from QTP help.

47 comments:

  1. Thanks for this post, it was useful for me

    ReplyDelete
  2. Glad that it was useful for you. Keep visiting the blog.

    ReplyDelete
  3. Thanks for giving important information to training seekers,Keep posting useful information

    QTP Training Chennai

    ReplyDelete
  4. Thanks for giving important information to training seekers,Keep posting useful information.
    selenium training in chennai

    ReplyDelete
  5. Can anyone tell me what is the difference between invoke/Systemutil and sapguiutil

    ReplyDelete
  6. Till now we launched sap by using invoke application, but suddenly objects were not identifying so we moved sapguiutil method for launching. If we use this method all objects are identifying perfectly all of sudden..
    Can any one tell me what is the difference exactly between invoke and sapguiutil.
    Kindly please provide an answer..

    ReplyDelete
  7. I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
    big-data-hadoop-training-institute-in-bangalore

    ReplyDelete
  8. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Hadoop Training in Chennai

    Hadoop Training in Bangalore

    Big data training in tambaram

    Big data training in Sholinganallur

    Big data training in annanagar

    ReplyDelete
  9. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops Training in pune

    Devops Training in Chennai

    Devops Training in Bangalore

    AWS Training in chennai

    AWS Training in bangalore





    ReplyDelete
  10. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    rpa training in Chennai | rpa training in pune

    rpa training in tambaram | rpa training in sholinganallur

    rpa training in Chennai | rpa training in velachery

    rpa online training | rpa training in bangalore

    ReplyDelete
  11. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
    java training in tambaram | java training in velachery

    java training in omr | oracle training in chennai

    ReplyDelete
  12. I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!

    Data Science course in Chennai
    Data science course in bangalore
    Data science course in pune
    Data science online course

    ReplyDelete
  13. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
    angularjs-Training in pune

    angularjs-Training in chennai

    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    ReplyDelete
  14. I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.
    Hadoop Training in Chennai
    Cloud computing Training
    Cloud computing Training Chennai
    Cloud computing Training centers in Chennai
    Hadoop Course in Chennai
    best big data training in chennai

    ReplyDelete
  15. Awesome post. Really you are shared very informative concept... Thank you for sharing. Keep on updating...

    Education
    Technology

    ReplyDelete
  16. Thank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in.
    Java Training in Chennai
    PHP Training in Chennai
    Best Java Training Institute in Chennai with placement
    Java J2ee Training in Chennai
    PHP course
    PHP Training

    ReplyDelete
  17. I’m experiencing some small security issues with my latest blog, and I’d like to find something safer. Do you have any suggestions?
    safety course in chennai

    ReplyDelete
  18. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.



    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    AWS Interview Questions And Answers

    Learn Amazon Web Services Tutorial |AWS Tutorials For Beginners

    Amazon Web Services Training in OMR , Chennai | Best AWS Training in OMR,Chennai

    ReplyDelete
  19. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    python Training institute in Pune
    python Training institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  20. You got an extremely helpful website I actually have been here reading for regarding an hour. I’m an initiate and your success is incredibly a lot of a concept on behalf of me.
    Data Science training in Chennai
    Data science training in Bangalore
    Data science training in pune
    Data science online training
    Data Science Interview questions and answers
    Data Science Tutorial

    ReplyDelete
  21. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Best Devops Training in pune
    Devops Training in Bangalore
    Microsoft azure training in Bangalore
    Power bi training in Chennai

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!
    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  24. Such a very useful Blog. Very interesting to read this article. I have learn some new information.thanks for sharing. data science courses

    ReplyDelete
  25. First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks.
    data scientist training and placement

    ReplyDelete
  26. Thanks for sharing this blog. The content is beneficial and useful. Very informative post. Visit here to learn more about Data Warehousing companies and Data analytics Companies. I am impressed by the information that you have on this blog. Thanks once more for all the details.Visit here for Top Big Data Companies.

    ReplyDelete
  27. Nice blog and informative content. Keep sharing more stuff like this. Thank you. If you want data science course training, check out the below link.
    Data Science Institute in Hyderabad

    ReplyDelete
  28. It is extremely nice to see the greatest details presented in an easy and understanding manner.
    data science course in hyderabad

    ReplyDelete
  29. Probably since sometimes tough career discuss. Whole environment lead.world-news

    ReplyDelete