TRANSCRIPT
Welcome to the fifth lesson in desktop ui automation in LEAPWORK
In this lesson we are looking into a flow that opens and uses 3 different applications.
First we start up the LEAPWORK 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. I'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 LEAPWORK,
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 flow.
(Automation case runs)
Next we need 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 address already in.
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 its destination,
I'm 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 automation type, we have access to the entire web automation features as well as Desktop.
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 LEAPWORK Agent is installed, whereas the Web Automation flows can run both under the LEAPWORK Agent
but also under any Selenium based environment. So the rule of thumb is - all building blocks will work on a machine where the LEAPWORK agent is installed, and if you want to run flows 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:
LEAPWORK.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.
I'll capture the subject, and then I open the Strategy Editor for the element.
I want to be able to configure what subject to look for, so I find a strategy that is based
on the actual text and replace this with a Dynamic Field. This way I can inject the subject I'm looking for.
With the field added to the Find Web Element block, I can now connect the text I 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 flow...
(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 an automation flow.
We have seen how easy it is to mix desktop automation with web automation and to share values
between the 2 technologies.
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.