I have a webpage which dynamically displays a text which I want to copy into a text file using watir-webdriver or any other additional gems. Is it possible?? If yes, how??
Thanks in advance..
I have a webpage which dynamically displays a text which I want to copy into a text file using watir-webdriver or any other additional gems. Is it possible?? If yes, how??
Thanks in advance..
If you are talking about web-scraping try Nokogiri
I will assume that you you have HMTL like this:
<div id="tehcodez">teh codez</div>
This would save text teh codez
to file tehcodez.txt
(not tested):
text = browser.div(:id => "tehcodez").text
File.open("tehcodez.txt", "w") {|file| file.write(text) }