O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – getting the current status of application cache

One of the things that you will want to constantly do during your testing is to make sure that the application cache is storing your files. We can see if they have been downloaded.

  1. Create a new test class using the example code at the beginning of the chapter.
  2. In this part we are just going to check if the application cache is working. We do this by doing:
    AppCacheStatus status = (ApplicationCache) driver).getStatus();
  3. The status should be equal to uncached when we load it.
  4. The final class should look like the following:
    import org.junit.*; import org.openqa.selenium.*; public class TestChapter10 { WebDriver driver; @Before public void setUp(){ driver = new AndroidDriver(); driver.get("http://book.theautomatedtester.co.uk/"); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required