课程: Advanced Selenium: Page Objects and GUI Automation

今天就学习课程吧!

今天就开通帐号,24,100 门业界名师课程任您挑!

Domain abstractions

Domain abstractions

- [Instructor] Dijkstra in his speech " the humble programmer" said, the purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. And that is one of the guiding principles I use when creating abstraction layers. And that translates into code. So when I look at my code, my test code here can create a list, I'm thinking is this absolutely precise. So I have an object that TodoListName. And that's pretty precise, it represents a TodolistName. I have page objects, which hide information about the page, they expose the logical functions that I can do on the page. And that's pretty precise. I could probably be even more precise if I had objects representing the user and potentially a TodoList object and a TodoItem object. So I should explore the concept of a higher level set of domain objects and see how that impacts my test code. So at the moment, I have an implied user…

内容