Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Is your page Loaded?

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Is your page Loaded?

How can you tell if your page is loaded when it is so dynamic? How can you test for everything and yet keep your codebase organized and simple? With the proper application of both the Page Object Pattern and the Command Pattern your codebase can remain organized and elegant. Lets talk about how to apply them together and you can see for yourself.

For an example of how one can implement see this repo, https://github.com/ejelinek/CommandFactory

Avatar for Eric Jelinek

Eric Jelinek

June 10, 2013
Tweet

Other Decks in Programming

Transcript

  1. Command Pattern Command Factory creates isLoadedCommands isLoadedCommands know what to

    test and how to test Page Factory builds pages with commands Page executes isLoadedCommands isLoadedCommands determine if a page has been loaded
  2. class QueryIsLoadedCommand implements IsLoadedCommand { WebElement query QueryIsLoadedCommand(WebDriver driver) {

    query = driver.findElement() } @Override isLoaded() { assertTrue(query.isVisible()) } }