Hi all, Im trying to get text off the browser and assign it to a variable to use later on. Pretty standard really. However its just not working..
In irb> this : puts /(1\d+)/.match(workspace.text) returns the text : 150543110 So it only makes sense that this: pproduct_no = /(1\d+)/.match(workspace.text) is equal to 150543110 as proven here puts pproduct_no 150543110 However when I do this workspace.text_field(:id,"NUM_prcsdProductId").set(pproduct_no) returns this error ArgumentError: comparison of String with 128 failed from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ input_elements.rb:386:in `>' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ input_elements.rb:386:in `characters_in' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ input_elements.rb:373:in `type_by_character' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ input_elements.rb:339:in `set' Although....this seems to work just fine. workspace.text_field(:id,"NUM_prcsdProductId").set("150543110") Something just aint right here. Anyone wish to advise?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---