From the course: Advanced Selenium: Page Objects and GUI Automation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Component abstractions

Component abstractions

From the course: Advanced Selenium: Page Objects and GUI Automation

Start my 1-month free trial

Component abstractions

- [Instructor] Component abstractions are objects that represent shared components on a page. Let's look at the application and see what components there are. So here we have a menu bar at the top, and that seems consistent between the two main views in the application. We have the CreateInputBox, which again, seems like it might be consistent, or the list itself might be. So we have at least three potential areas that we might create components for. And creating components might cut down on the maintenance in the actual tests or the page objects themselves. So let's have a look at the code here. And in the page objects, it might be more obvious what's consistent. So the page objects don't do very much at the moment, but we could see that we have an enterTodoListName in the lists one and the TodoListPage has enter a Todo. And they have pretty much the same functionality where they find an element and send keys, and…

Contents