UI Automation Week Feb 2021 - Challenge 2 - Clean up messy code (Intermediate)

This challenge is one of the UI automation week challenges that get you thinking about and practising UI automation. Our challenges offer activities for you to try out new tools, learn new skills and knowledge. Whether you are just starting out in UI automation or an expert looking to try out something new. We have the challenge for you.

Experience Level: Intermediate

Introduction: Working with UI automation isn’t all about tools. Yes, it’s important to know how they work and their features, but it’s also important to keep our code clear, ordered and maintainable. This challenge helps you learn how to structure UI automation code in a sensible way.

Purpose: This activity has you cleaning up a collection of UI automation checks/tests to help you learn how to utilise skills such as abstraction, encapsulation, and DRY principles to create a cleaner codebase. This activity also encourages you to try out techniques such as the PageObject architecture.

Activity:

  1. Download one of the automation framework suites (There is one for C#, Java, JavaScript and Python - You don’t have to do all the languages, just choose the one(s) you’re most comfortable with.)
  2. There is a lot of duplication, hard-coded values and brittle selectors in the codebase. Refactor the code (update it, don’t add new checks/tests) so that it is easier to read and has let brittleness

Share your experience report:

Did you manage to complete the challenge? Why not share your results, your journey to solving the challenge and what you learnt in one of our experience report sessions during UI automation week. All we need is 20 minutes of your time for a demo of your solution and a chat with our host, answering questions on what you learnt. We’ll even pay you for your time!

If you want to get involved all you need to do is complete our form sharing which challenge you took and what you would like to share.

Submission Deadlines: If you’re doing the challenge in

  • Java: Friday, the 19th of February 2021
  • Python: Monday, the 22nd of February 2021
  • JavaScript: Monday, the 22nd of February 2021
  • C#: Monday, the 22nd of February 2021
1 Like

Hi all. If you want to see my code for this challenge, it can be seen here

Looks really good @sandeepthukral
I’ll take advantage of your post to also add a link to my code for the same challenge.

1 Like

@zecarrera I love the way you made this a BDD like reporting.

1 Like