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.

Data abstractions

Data abstractions

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

Start my 1-month free trial

Data abstractions

- [Instructor] Test data is an important concept because it allow us to expand coverage of our automated execution. So we really need to explore how to abstract that data modeling and how we can use it in combination with our other concepts like page objects. So in this test, the data objects test, we have a method called canCreateAList. And that uses a simple page object called the DataObjectsTodoListsPage to enter a to do list on the page. And we can see that there's some sort of random string generator being used to create the name of the list. Now this is a very basic random data abstraction, on line 12 I have the valid characters I'm going to use, line 14 configures this so that we're using a separator, so I can pass in a space if I wanted, a word list and then the generate function picks a random number of words and a word length and looks over pulling out characters to generate a random string. And I'm using that in…

Contents