Tips and tricks Best practice guides, FAQ & more
At Leapwork, we are always looking for smarter ways to solve tasks, and we often use our own tool to help us do that. This post is a real-life example of how we in our marketing department built a simple automation case with significant efficiency gains. Specifically, we designed an automated test case for checking hundreds of domain names from a list with mock contact data.
Here's what we did to improve efficiency in our marketing department. If you want to do the same, all you need is a free trial of Leapwork.
Whether it is for trying out a new email integration in your CRM system or demonstrating how something works in your Marketing Automation application, mock contacts are useful test data.
For enhancing understanding, it helps if the mock data resembles real contacts. To achieve this, you need to make the contact properties (name, company, and email address) look like real entries. This gets a little tricky when it comes to email addresses and website URLs as you want to avoid listing domain names that actually exist.
To check if they exist you can of course type the domain entries from your contact list into your web browser one by one. But what if your contact list includes hundreds of domain names?
The marketing department at Leapwork was tasked with creating a list of hundreds of mock contacts for an app that was to be launched and used in product demonstrations of a mock CRM system.
To enhance the app’s usefulness for training purposes, we wanted the contact list to be relatable and thematic, rather than just relying on placeholder data.
This meant that we had to create hundreds of mock email addresses. These could potentially include domain names owned by someone, which we of course wanted to avoid.
We used the Leapwork automation platform to build a simple automation case for testing whether the domain names exist.
Below is a screenshot of how the case was designed in Leapwork Studio.
To set up this case, we followed the following steps:
We wanted a web browser to be opened automatically, so that the website URLs could be checked. In this example, we used the Chrome browser.
The list of mock contacts lived in an Excel sheet with a column called ‘Domain’. The sheet was uploaded to the ‘Read Excel’ building block, and then the property ‘Domain’ was mapped as the data input for the next step in the flow.
We wanted our web browser to navigate to the URLs provided in the Excel sheet. Instead of typing in the URLs in the Web address field, the ‘Domain’ property served as a dynamic input to this building block.
Next, we defined a value used for validation. We set up the case to pass if the URL returned an error message stating that the given domain does not exist, because we did not want the domains in our list of mock contacts to be owned by anyone.
To indicate whether a domain existed, we asked Leapwork Studio to look for a web page header (H1, specifically) with the text: “This site can’t be reached” as that is the Chrome browser’s default error message for domains that don’t exist.
If the web text defined in step four was not found on a given web page (meaning that the given domain does exist), then Leapwork Studio was set to log a screenshot of that page.
This case was set to test all the hundreds of URLs listed in the Excel sheet. We did this by choosing the ‘Iterate’ method in the ‘Read Excel’ building block.
When Leapwork Studio had run through all the domains to be checked, the case was done. Because of the ‘Log web screenshot’ action, we now had a list of screenshots with all the domains which did in fact return a website, and which could not be used in a mock contact list. We could also quickly scan the screenshots for whether the URLs were host domain-vendors, in which case they were fit for use.
The efficiency gains achieved in this case were clear:
Approximate time needed for checking 200 domain names manually one at the time:
Approximate time needed for designing and running the automation case with Leapwork:
What’s more, if the contact list consisted of a thousand contacts, it would still only take around 5 minutes to build the automation case with Leapwork. The time needed for doing this task manually, on the other hand, would keep increasing with the number of contacts.
This case can also be used inversely for real contact data. For example, if you have an offline list of contacts of sales leads, and, before uploading the contacts into your CRM system, you want to check the quality of the contacts by testing the validity of their email domains. You would just need to redefine how the test passes, and then log any domains that return an error message.
Finally, If you are looking for a web domain for your business, and you have a long list of suggested domain names, you could also use this case for easily checking which ones of them are available.
Are you interested in learning more about how you can use Leapwork's automation platform to increase efficiency and reduce the amount of repetitive work in your team? Then join our webinars on no-code automation, or start your trial below.