Imagine again that you are working against a word processing application but instead of it auto saving the text that you type to somewhere that is persisted, you only save it briefly waiting for the user to click save.
Let us see how we can use it.
testMethodto the class we created in the previous section. We can call it
WebDriverobject to a
SessionStorageobject, so we can start accessing the methods it has available like the following:
SessionStorage storage = (SessionStorage) driver; assertEquals(0, storage.size());
import org.junit.*; import org.openqa.selenium.*; ...