Multi application cases

Learn how to automate a multi application process.

In this video

  • How to move and capture between desktop applications
  • How to use web automation as part of a desktop case
  • How to build asserts based on values from different applications in the flow.

Go to next video.

Lesson Overview

Learn how to automate a multi application process.

In this video

  • How to move and capture between desktop applications
  • How to use web automation as part of a desktop case
  • How to build asserts based on values from different applications in the flow.

Go to next video.

In this lesson we will look at a case that crosses multiple applications. In this case the Leaptest Demo application, Outlook and a Chrome browser running the Gmail application.

The lesson will show how easy it is to move between applications and how you can seamlessly mix and match between technologies (Desktop UI and Web) and how easy it is to automate even complex multi application processes.

Welcome to the fifth lesson in Desktop UI automation in Leaptest. In this lesson we are looking into a case, that opens and uses 3 different applications.

First we start up the Leaptest Demo application as we have seen in the previous lessons. We will search for a specific contact person and then click on the email link. This will cause the default mail program on my computer, in this case Outlook, to compose a new mail. We’ll set a few fields in the mail and then send it.

To verify that the mail was correctly received we will use the web automation features in Leaptest, to open up Gmail in a chrome browser – all within the same flow.

We start out in a known scenario with a login and a search for a contact person. In this case Robinson Crusoe. Let me just run the case.

(Automation case runs)

The next this is to click on the email-link by adding a Click UI Element block and then capturing the email-link. Let’s just run the click block.

As we can see this opens up a new mail with the email prefilled. The Outlook window is now the active window so we can now add a few blocks operating on this window. First we will set the Subject using a Set Value block, capturing the field and specifying the value: “Where are you?”. Then we use a Click block to send this simple mail.

Let’s run the 2 mail blocks and see the mail getting send.

(Automation case runs)

The mail closed down after sending it.

To open the gmail client and verify that the mail reached it’s destination, we are adding a Start Web Browser block. Those of you familiar with web automation
knows this block very well – it will open the selected browser and navigate to the URL specified.

When we select “Desktop UI” as the case type, we have access to the entire web automation features.The other way around is not true – if we select “Web Automation” as the case type, we can’t use the Desktop UI features. This is caused by the fact that the Desktop UI features will only run on a machine where the Leaptest Agent is installed, whereas the Web Automation cases can run both under the Leaptest Agent but also under any Selenium based environment. So the rule of thumb is – all building blocks will work on a machine where the Leaptest agent is installed, and if you want to run tests on for instance SauceLabs or BrowserStack you should select the Web Automation case type, as it will limit you to the building blocks supported for those environments.

Back to the actual case!

I’ll just run the Start Web Browser and we can see a new Chrome browser opening up, navigating to the login page. The browser opened using the Start Web Browser block is always cleared for cookies and cache, so we need to include the login in the flow.

I’m using a Click Web Element to set focus in the email field. Then I use a Type Web Text to insert the email into the field: “leaptest.evangelist”.

Finally we click the Next button which brings us to the password page. I’ll do more or less the exact same with the password – just selecting the password option to hide he actual password.

Let’s run the final web blocks to get to the mail inbox.

(Automation case runs)

As we can see, the mail is in the inbox and now I will use a Find Web Element to verify this. We’ll capture the subject, and then we open the Strategy Editor for the element. We want to be able to configure what subject to look for, so we find a strategy that is based on the actual text and replace this with a Dynamic Field. This way we can inject the subject I’m looking for.

With the field added to the Find Web Element block, we can now connect the text we inserted in the subject of the mail to this field. This ensures that whatever subject we insert will be used when searching for the mail.

Let’s change the subject a bit – “Where are you now?” and run the entire case…

(Automation case runs)

As we can see that mail was found and the case passed.

In this lesson we have seen how we can move between different applications and technologies as part of a automation case. We have seen how easy it is to mix desktop automation with web automation and to share values between the 2 technologies.