How do I get the value of a non-form div element
I have a webpage with footer as follows :-
<div id="footer" class="container_24 clearfix" align="center">
<span style="float: right;">Mar Inc. © 2011</span>
<span id="build_version_string" style="float: right;">ghq-master-2125-g239c5f3</span>
My aim is to get the value of "build_version_string" which in this case is "ghq-master-2125-g239c5f3". In my case, this is dynamic and I am not aware of the value before selenium test runtime.
I tried @selenium.get_value "id=build_version_string"
, however it开发者_如何学运维 threw error :-
"ERROR: This element has no value; is it really a form field?"
It is not a form field. So is there a way to get that value ?
精彩评论