Re: [wtr-general] Entering XML in textarea
Hi, Try thi #*puts doc* = retruns the text So Pelase convert doc into String *doc=doc.to_s* puts doc.class = String (The next line works only the inoput is String or Fixnum.) *$browser.text_field(:id, NewAEPGrid_ctl02_CoDFBox2).set(doc) * Now it should work .. Let me update here On Tue, Aug 2, 2011 at 9:26 PM, Trevor ti_ma...@btopenworld.com wrote: watir version = 1.9.2 ruby version = 1.8.7 Hi, I need to read XML from a document and put it into a textarea. I use REXML to read the file, but when I try to dump this into the textarea I get an error and the field shows [object] eg file = File.new( C:/canoe1.xml ) doc = Document.new file # puts doc $browser.text_field(:id, NewAEPGrid_ctl02_CoDFBox2).set(doc) If I uncomment the puts doc, I can see that the XML is being read into doc. If I change the .set(doc) to e.g. .set(test) then the word test is written OK into the field with no error. The error I see is: NoMethodError: undefined method `value' for UNDEFINED ... / :REXML::Document C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/ input_elements.rb:382:in `method_missing' C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/ input_elements.rb:382:in `set' C:/WATIR/CanoeETVScheduler/xml_test.rb:29:in `test01_NewAEP' Is what I am trying to do actually possible or do I need to investigate other options (the only similar post I found seemed to suggest using cut'n'paste from an editor) Thanks -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Regards, P.Raveendran http://raveendran.wordpress.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Entering XML in textarea
Thanks Charley - that does the trick Trevor On Aug 2, 11:25 pm, Charley Baker charley.ba...@gmail.com wrote: Try setting value instead of set. blah.value = doc Cheers, Charley On Tue, Aug 2, 2011 at 4:03 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Aug 2, 2011 at 5:56 PM, Trevor ti_ma...@btopenworld.com wrote: file = File.new( C:/canoe1.xml ) Can you provide xml file, so we could try to reproduce the problem? Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Entering XML in textarea
This solution also works Thanks, Trevor On Aug 3, 7:36 am, Raveendran P jazzezr...@gmail.com wrote: Hi, Try thi #*puts doc* = retruns the text So Pelase convert doc into String *doc=doc.to_s* puts doc.class = String (The next line works only the inoput is String or Fixnum.) *$browser.text_field(:id, NewAEPGrid_ctl02_CoDFBox2).set(doc) * Now it should work .. Let me update here On Tue, Aug 2, 2011 at 9:26 PM, Trevor ti_ma...@btopenworld.com wrote: watir version = 1.9.2 ruby version = 1.8.7 Hi, I need to read XML from a document and put it into a textarea. I use REXML to read the file, but when I try to dump this into the textarea I get an error and the field shows [object] eg file = File.new( C:/canoe1.xml ) doc = Document.new file # puts doc $browser.text_field(:id, NewAEPGrid_ctl02_CoDFBox2).set(doc) If I uncomment the puts doc, I can see that the XML is being read into doc. If I change the .set(doc) to e.g. .set(test) then the word test is written OK into the field with no error. The error I see is: NoMethodError: undefined method `value' for UNDEFINED ... / :REXML::Document C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/ input_elements.rb:382:in `method_missing' C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.9.1/lib/watir/ input_elements.rb:382:in `set' C:/WATIR/CanoeETVScheduler/xml_test.rb:29:in `test01_NewAEP' Is what I am trying to do actually possible or do I need to investigate other options (the only similar post I found seemed to suggest using cut'n'paste from an editor) Thanks -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr... -- Regards, P.Raveendranhttp://raveendran.wordpress.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Watir framework
I have write the custom framework using ruby test-unit. I want feedback from you people. http://qtp-help.blogspot.com/2011/08/watir-framework.html -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir framework
I'm not sure why you wouldn't just use something like rspec or cucumber? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] browser.speed?
Hi all, What is the current established way of using browser.speed to speed up text field value entering? Virtually all of my scripts use 'browser.speed = :fast', and do work well in my ageing Ruby186/Watir162/XP/IE8 environment. However, things are not the case in the new environment that I'm evaluating. Ruby187/Watir192/Win7/IE9 seems to completely ignore 'browser.speed = :fast'. 'browser.speed = :zippy' works, but causes me some issues. Granted, these :zippy issues could be a problem at my end, but certainly I'm confused as to why :fast no longer works under IE9. Thanks, GJHmf -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir framework
Rspec and Cucumber is behavior driven system. Some people are not comfortable with that, I am one of them that's the reason i choose test-unit. On Aug 3, 3:24 pm, Alister Scott alister.sc...@gmail.com wrote: I'm not sure why you wouldn't just use something like rspec or cucumber? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Object no longer attached to the DOM error on doing a exists call
On Tue, Aug 2, 2011 at 9:44 PM, Jari Bakken jari.bak...@gmail.com wrote: But, I understand the performance hit. Are we talking much slower execution times? I've changed the behaviour on the no-element-cache branch: https://github.com/jarib/watir-webdriver/tree/no-element-cache Please try it out and let me know what you find. Taking into account the comments about using watirspec as a benchmark in my last email, the change appears to add about 10 seconds to the test run (from 145 seconds to 155 seconds) on my machine. Jari -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com