title: Get attribute from body tag. Selenium Webdriver
body: <p>I have body tag with attributes from which I need to get email address to assert in Selenium WebDriver test. Is it able to go it via default locators?</p>
  
  <pre><code>&lt;body ng-init=" user={"id":43,"email":"EMAIL@gmail.com","username":"USER_NAME","balance":2259,"location":null,"d
  escription":null,"fullname":"FULL_NAME","notification_settings":
  {"newsletter":true,"follower":true,"mention":true,"comment":true},"settings":{"nsfw":false}};
  user.small_avatar_url ='http://cdn.stage.uprise.com/user/43/small_34_34_20131111162316735';
  " ng-class="(notice) ? 'with-notice' : ''" data-twttr-rendered="true" class=""&gt;
  </code></pre>
  
  <p>Solution what is workig for me is here: </p>
  
  <pre><code>    String nginit =  this.getBrowser().findElement(By.tagName("body")).getAttribute("ng-init");
      String[] arr = nginit.split(",");
      for ( String ss : arr) {
          if(ss.contains("email")) {
              String[] email = ss.split("\"");
              this.loggedinEmail = email[3];
          }
      }
  </code></pre>