from bs4 import BeautifulSoup


class DashPageMixin(object):
    def _get_dash_dom_by_attribute(self, attr):
        return BeautifulSoup(
            self.find_element(self.dash_entry_locator).get_attribute(attr),
            "lxml",
        )

    @property
    def devtools_error_count_locator(self):
        return ".test-devtools-error-count"

    @property
    def dash_entry_locator(self):
        return "#react-entry-point"

    @property
    def dash_outerhtml_dom(self):
        return self._get_dash_dom_by_attribute('outerHTML')

    @property
    def dash_innerhtml_dom(self):
        return self._get_dash_dom_by_attribute('innerHTML')

    @property
    def redux_state_paths(self):
        return self.driver.execute_script(
            "return window.store.getState().paths"
        )

    @property
    def redux_state_rqs(self):
        return self.driver.execute_script(
            "return window.store.getState().requestQueue"
        )

    @property
    def local_storage(self):
        return self.driver.execute_script(
            "return JSON.parse(window.localStorage);"
        )

    @property
    def session_storage(self):
        return self.driver.execute_script(
            "return JSON.parse(window.sessionStorage);"
        )

@@ -522,17 +522,17 @@
 tribute(
-'
+%22
 outerHTM
@@ -528,25 +528,25 @@
 e(%22outerHTML
-'
+%22
 )%0A%0A    @prop
@@ -631,17 +631,17 @@
 tribute(
-'
+%22
 innerHTM
@@ -645,9 +645,9 @@
 HTML
-'
+%22
 )%0A%0A 
@@ -962,44 +962,52 @@
     
-@property%0A    def local_storage(self
+def get_local_storage(self, store_id=%22local%22
 ):%0A 
@@ -1094,27 +1094,49 @@
 localStorage
-);%22
+.getItem('%7B%7D'));%22.format(
 %0A        )%0A%0A
@@ -1132,32 +1132,57 @@
         
-)%0A%0A
     
-@property
+    store_id%0A            )%0A        )%0A
 %0A    def
@@ -1182,16 +1182,20 @@
     def 
+get_
 session_
@@ -1202,24 +1202,46 @@
 storage(self
+, session_id=%22session%22
 ):%0A        r
@@ -1326,19 +1326,82 @@
 nStorage
-);%22
+.getItem('%7B%7D'));%22.format(%0A                session_id%0A            )
 %0A       

fix issues with two storage properties