Parsing Query

Hi,

setValue('buyAt','8010.2500');

setValue(‘buyStoploss’,‘7987.8906’); setValue(‘sellAt’,‘7987.8906’);
setValue(‘sellStoploss’,‘8010.2500’);
setValue(“buy”,‘8028.6243 — 8051.0350 — 8073.4769 —
8095.9500’);
setValue(“sell”,‘7969.5453 — 7947.2373 — 7924.9605 —
7902.7150’);

I wrote the following code:
raw_results = result_page.search(“script”).text.scan(/^‘buyAt’ ‘.*’/)

But I don’t seem to get the following output in CSV:
Buy at / above Target Sell at / below Target
8010.25 8051.035 7987.8906 7947.2373

Appreciate your help!

TIA

Hello Rakesh,

I don’t understand what you are trying to do. You have an instruction
and a price:

def setValue(instr, price)

do something to a page?

end

class ResultPage
def search(script)
# what’s a script?
#
# something which returns an object
# with a text method which is basically a string?
end
end

You go to the effort of associating an instruction with a price, it
should be very easy to return all the prices associated with a
particular instruction, right?

What has this got to do with CSV?