> str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style").invoke("cssText") > > I think that this might also do the same thing: str_value=$browser.span(:id, "MainLogin_UserNameRequired").style.cssText