title: how to find the css style attribute of a particular html element using Robot Framework?
body: <p>I am writing an automation test script using Robot Framework &amp; Selenium2Library for testing our web application( in <code>.txt</code> format) . One of my test cases involves to check the CSS style attribute of an HTML tag.</p>
  
  <p>Is there any specific keyword in Robot Framework to obtain the CSS style attribute of an html element?</p>
  
  <p>Here is my testing scenario:</p>
  
  <pre><code>&lt;div id="check_style" style="width:20px;height:20px;background-color:#ffcc00;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Now, I have to store the background color of this particular html tag into a variable <code>${bg_color}</code>. Is there any specific keyword in Robot Framework to do this process?</p>
  
  <p>Can you please suggest an effective way to handle this situation?</p>
  
  <blockquote>
    <p>I think we can make use of this javascript function for the above mentioned purpose : </p>
    
    <p><code>document.getElementById("check_style").style["background-color"]</code></p>
    
    <p>But how to make use of this particular function to store the value of background-color inot a variable <code>${bg_color}</code>  ? </p>
    
    <p>( I have tried to execute <code>${bg_color} =  Execute Javascript  document.getElementById("check_style").style["background-color"]</code>,
    but didn't work ! )</p>
  </blockquote>