TRANSCRIPT
Welcome to the eighth lesson on Automating across Desktop and Web Applications in Leapwork.
In this lesson, we will explore a flow that involves working with both desktop and web applications.
To start, we will launch the Leapwork Demo application. Our goal is to generate a new record within the application. Once the record is created, we will search for its details and then click on the email link associated with the contact.
This action will open the default mail program on the computer, which in this case is Outlook. We will then compose a new mail by setting various fields and finally send it.
To ensure that the email is successfully received, we will leverage the web automation capabilities of Leapwork. Within the same flow, we will use Leapwork to open Gmail in a Google Chrome browser and perform necessary verifications.
This combined approach of automating desktop and web applications allows us to seamlessly integrate different systems and achieve efficient end-to-end automation.
Let’s Create the flow, I have already had the Sub flows for Login to the Demo App and creation of a new record, and we add the Sub flows.
Run the flow once.
The New user is created Successfully,
I am utilizing the recording feature of Leapwork to demonstrate the workflow.
To begin, I will proceed with searching for the record that was previously created.
Once the record is found, it contains an email link, which will be clicked using a "Click UI Element" block.
Upon clicking the email link, a new mail window will open in Outlook. To interact with this window, we will add a series of blocks. First, a "Set UI Element" block will be used to set the subject field by capturing the field and specifying the desired value.
Next, a "Click UI Element" block will be employed to send the email.
After sending the email, the recording can be stopped by hovering over the recording button and selecting the "Save and Close" option.
Next, we need to open the Gmail client to verify if the email has been received. We will use the "Start Web Browser" block to open a Chrome browser and navigate to the login page. Since the browser opened through this block is cleared of cookies and cache, we need to include the login process in the flow.
To accomplish this, we will use a "Type Web Text" block to insert the email into the email field, followed by a "Click Web Element" block to click the "Next" button, which leads to the password page.
Similar steps will be taken to handle the password field, selecting the password option to hide it and using a "Click Web Element" block for the "Next" button.
Let's run the final web blocks to get to the mail inbox.
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 use a Get Web Text to fetch the subject text value.
To verify if the email has arrived, we will use a "Find Web Element" block to capture the subject and a "Get Web Text" block to fetch the subject text value. Then, we will use a "Compare" block to compare the fetched subject text with the subject we inserted in the email.
To demonstrate the flexibility of the flow, we can change the subject and run the entire flow again.
We can observe that the email was successfully found, and the case passed.
This lesson explored the seamless integration of different applications and technologies within an automation flow. We witnessed how easy it is to combine desktop automation with web automation and share values between these two technologies.