title: How do I get the background url from css Selenium Webdriver
body: <p>I'm trying to check the url of an image, located in a div - in the 'background:' - in the CSS for the page.  But when 'get' the CssValue and display it just shows blank.</p>
  
  <p>The html for the div is:</p>
  
  <pre><code>&lt;div class="Welcome"&gt;
  
  &lt;h3&gt;Welcome&lt;/h3&gt;
  .......
  &lt;/div&gt;
  </code></pre>
  
  <p>...and the CSS for the div is:</p>
  
  <pre><code>div.Welcome {
  background: rgba(0, 0, 0, 0) url("imageurl") no-repeat scroll center 25px;
  float: left;
  margin: 50px 20px 50px 150px;
  padding-top: 230px;
  width: 300px;
  }
  </code></pre>
  
  <p>I've tried to locate as below:</p>
  
  <pre><code>WebElement WelcomeImg = driver.findElement(By className("Welcome"));
  
  String WelImg = WelcomeImg.getCssValue("background");
  
  Assert.assertTrue(WelImg.contains("imageurl"));
  </code></pre>
  
  <p>I've also tried with</p>
  
  <pre><code>("background-url");
  </code></pre>
  
  <p>Any help would be greatly appreciated</p>