Imagine that your application has stored something in the localStorage while the user has been interacting with the application. An example of this might be if you were working in a word processing application and it auto saves what you have typed to the box every so often. If your application were offline, it can still save the information.
Let's see how we would access this.
Create a new test class. You can use the example code at the beginning of the chapter to help you create it quicker.
Accessing the LocalStorage object will require us to case the WebDriver object
to it. This is similar to what we saw with BrowserConnection previously.
Now run your test class. It should look something like the following:
What just happened?
We have just seen how we can access LocalStorage, the Selenium WebDriver API, for accessing the browsers' localStorage object. This means that we can have a look and check what the application has stored on the user's local storage. If were to log
Session storage is a very similar technology to local storage. The main difference is that it does not persist.If you were to close the tab and then reopen it, while using Firefox for example, session storage items will not be available where local storage will still be available.
Let's see how we can work with it.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.