title: Get Css Value Width in % - Selenium WebDriver- JUnit
body: <p>I have a web page which displays a dynamic layout (generated by extjs) which is supposed to occupy 100% of the width.
  I am using</p>
  <blockquote>
  <p>WebElement element = driver.findElement(By.id(&quot;ext-gen4&quot;));</p>
  <p>String backgroundColor = element.getCssValue(&quot;width&quot;);</p>
  </blockquote>
  <p>But currently it is returning the width in pixel and on top that the WebDriver browser (Firefox) is not displayed in maximum mode so the value is even less.
  Is there any way I can get the value in %? I came to know of some GetCssProperty class but I am unable to use it properly. Any details on that?
  I am using Selenium WebDriver 2.23 with JUnit.</p>
  <p>I guess there must be a way to maximize the window.</p>