This chapter covers
- How to create UI automation rapidly using GitHub Copilot and ChatGPT
- How to improve UI automation rapidly using GitHub Copilot and ChatGPT
If there is one area in the software testing industry that has garnered the most attention regarding the use of AI tools, it’s UI automation. As large language models (LLMs) began capturing attention, people in the testing world quickly focused on how UI automated checks could be easily generated through tools such as Copilot and ChatGPT. The possibilities and ideas around using AI tools for UI automation have been expanding rapidly. But although the enthusiasm for these tools is significant, and tool vendors and automators alike rush to use AI, we must be mindful of where and how AI can be of use.
Success with AI in creating automation is as much about knowing when to use AI tooling as it is about knowing how to use it. For this reason, this chapter focuses on how to break down the process of creating and maintaining automated checks and discover where AI tools can speed up our processes, while ensuring that we still deliver valuable automation.
7.1 Rapidly creating UI automation
Head to ChatGPT and ask it to generate a Selenium test in Java that automates a login page, and it will happily oblige. This might seem like an effective path to take, but let’s take a look at a brief example of this process and see what happens. For the prompt, we can use