title: How to Using Webdriver Selenium to get the value of "style" element
body: <p>I want to check whether the value of a style element is greater than a particular value (i.e., is left > 666px ?), but I am unable to get ahold of the value.</p>
  
  <p>Here is the HTML code of the style that I want to capture:</p>
  
  <pre><code>&lt;pre&gt;&lt;span id="da2c" style="left: 666px; top: 27px;"&gt;&lt;/pre&gt;
  </code></pre>
  
  <p>I am using this code to try to print its value, but it's not printing:</p>
  
  <pre><code>System.out.print(driver.findElement(By.id("da1c")).findElement(By.cssSelector("span")).getAttribute("style"));
  </code></pre>
  
  <p>I want something like this:</p>
  
  <pre><code>if ((driver.findElement(By.id("da1c")).findElement(By.cssSelector("span")).getAttribute("style")).value&gt; 700) {
    System.out.println("value exceeding")
  }
  </code></pre>