10
I'm writing a test code in Ruby and trying to parse a HTML source file of a website. It has a JavaScript variable which I can use to compare it against other values. For example:
<script type="text/javascript" language="JavaScript">
function GetParam(name) {
var req_var = {
a: 'xyz',
b: 'yy.com',
c: 'en',
d:0,
e: 'y'
};
}
</script>
Here I want to extract the variable req_var from this function. Is it possible to do that? If so can anyone please help me with that?