Why you shouldn’t use IDs in E2E testing

Hello. My name is Takuya Suemura (@tsueeemura), and I am a SET (Software Engineer in Test) for Autify.

Are you performing E2E testing? It used to be the case that Selenium was the only game in town, but now we have many frameworks like Puppeteer, Cypress, and TestCafe – there are so many choices, it almost makes it difficult to choose!

Regardless of what framework you decide to use, there are certain key factors to keep in mind when writing any form of E2E test.

The first is locators. These are keys used to target specific elements needed for manipulating or validating the page. Both CSS selectors and XPath can be used for locators. Generally speaking, you use attributes like id, class, and name.

Today I’d like to talk a bit more about locators.

Launching Autify Engineering Blog

Hello, I’m Hayato, a backend engineer at Autify. Our product, Autify, is an AI-powered test automation platform. You can create test scenarios with easy steps and run them on various browsers including Chrome, Edge, and even mobile browsers Safari on Apple devices and Chrome on Android devices. Our AI learns and tracks changes on your site and automatically update your test scenarios to reduce maintenance cost. As we are the expert in test automation, we have a large amount of knowledge about test automation and browsers.