Re: [wtr-general] Re: New (minor) version of the book
On Thu, Sep 22, 2011 at 8:42 PM, Super Kevy kpe...@scholarshipamerica.org wrote: The book is awesome for a Work in progress. Thanks. Will you ever consider describing how to configure some IDEs to run the script, SCITE, TEXTPAD come to mind :) Added to TODO: https://github.com/zeljkofilipin/watirbook/commit/6c6d083fc454401aadfeb6cef20ff1e602ccc683 I am not familiar with scite or textpad, so if you are using them, feel free to write a chapter or two for the book. Full credits to you and all that. If you have further comments, please send them to watirb...@googlegroups.com. I have sent 0.7.1 announcement here by mistake. Željko -- 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: New (minor) version of the book
Nice One Thanks. On Fri, Sep 23, 2011 at 1:45 PM, Aditya vaditya2...@gmail.com wrote: Great Book !!! On Fri, Sep 23, 2011 at 1:42 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Sep 22, 2011 at 8:42 PM, Super Kevy kpe...@scholarshipamerica.org wrote: The book is awesome for a Work in progress. Thanks. Will you ever consider describing how to configure some IDEs to run the script, SCITE, TEXTPAD come to mind :) Added to TODO: https://github.com/zeljkofilipin/watirbook/commit/6c6d083fc454401aadfeb6cef20ff1e602ccc683 I am not familiar with scite or textpad, so if you are using them, feel free to write a chapter or two for the book. Full credits to you and all that. If you have further comments, please send them to watirb...@googlegroups.com. I have sent 0.7.1 announcement here by mistake. Željko -- 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 -- 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 -- Thanks and Regards, Amit -- 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: undefined method click_no_wait
That's probably what I would do as well. As a sidenote, if this is happening on IE, that doesn't mean it will happen in FF. I just had a popup in FF and (very surprisingly) it seemed the test was still setting text_fields and clicking buttons in the browser while the popup was sitting on top of the browser. I thought it was a modal popup but maybe it wasn't... very weird. In cases of DLing/ULing using watir-webdriver i've started writing a lot of case statements switching on OS or browser flavor. Fun. On Sep 19, 12:05 am, Ivan Chung ivanchun...@gmail.com wrote: Thanks for the reply. At the end i have gave up thisclick_no_waitand direct use the autoit = WIN32OLE.new('AutoItX3.Control') to send the {enter} key for the js popup -- 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: Get Watir class methods
This should work (a text-field in this case): puts @browser.text_field(:id, 'foo').methods.sort On Sep 22, 11:51 am, Super Kevy kpe...@scholarshipamerica.org wrote: In ruby I can get methods for things like Integer or String by usiing .instance_methods(false) or .public_methods for example in IRB irb(main):006:0 String.instance_methods(false) = [:=, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], : []=, :insert, :le ngth, :size, :bytesize, :empty?, :=~, :match, :succ, :succ!, :next, :next!, :upt o, :index, :rindex, :replace, :clear, :chr, :getbyte, :setbyte, :to_i, :to_f, :t o_s, :to_str, :inspect, :dump, :upcase, :downcase, :capitalize, :swapcase, :upca se!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, :bytes, : chars, :codepoints, :reverse, :reverse!, :concat, :, :crypt, :intern, :to_sym, :ord, :include?, :start_with?, :end_with?, :scan, :ljust, :rjust, :center, :sub , :gsub, :chop, :chomp, :strip, :lstrip, :rstrip, :sub!, :gsub!, :chop!, :chomp! , :strip!, :lstrip!, :rstrip!, :tr, :tr_s, :delete, :squeeze, :count, :tr!, :tr_ s!, :delete!, :squeeze!, :each_line, :each_byte, :each_char, :each_codepoint, :s um, :slice, :slice!, :partition, :rpartition, :encoding, :force_encoding, :valid _encoding?, :ascii_only?, :unpack, :encode, :encode!, :to_r, :to_c, :matches, :t o_inputable_sym, :has_exact_prefix?, :without_pretty_indentation, :indent_by, :t aguri=, :taguri, :is_complex_yaml?, :is_binary_data?, :to_yaml] irb(main):016:0 String.public_methods = [:try_convert, :yaml_tag_subclasses?, :yaml_new, :allocate, :new, :superclass , :to_yaml, :freeze, :===, :==, :=, :, :=, :, :=, :to_s, :included_modules , :include?, :name, :ancestors, :instance_methods, :public_instance_methods, :pr otected_instance_methods, :private_instance_methods, :constants, :const_get, :co nst_set, :const_defined?, :const_missing, :class_variables, :remove_class_variab le, :class_variable_get, :class_variable_set, :class_variable_defined?, :module_ exec, :class_exec, :module_eval, :class_eval, :method_defined?, :public_method_d efined?, :private_method_defined?, :protected_method_defined?, :public_class_met hod, :private_class_method, :autoload, :autoload?, :instance_method, :public_ins tance_method, :pretty_print_cycle, :pretty_print, :syck_yaml_as, :yaml_as, :yaml _tag_class_name, :yaml_tag_read_class, :dclone, :taguri=, :taguri, :to_yaml_styl e, :to_yaml_properties, :syck_to_yaml, :pretty_print_instance_variables, :pretty _print_inspect, :nil?, :=~, :! ~, :eql?, :hash, :class, :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, :untrust , :untrusted?, :trust, :frozen?, :inspect, :methods, :singleton_methods, :protec ted_methods, :private_methods, :public_methods, :instance_variables, :instance_v ariable_get, :instance_variable_set, :instance_variable_defined?, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :respond_to_missing ?, :extend, :display, :method, :public_method, :define_singleton_method, :__id__ , :object_id, :to_enum, :enum_for, :pretty_inspect, :equal?, :!, :! =, :instance_ eval, :instance_exec, :__send__] irb(main):017:0 I haven't been able to get this to work with WATIR classes can anyone help me? -- 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: New (minor) version of the book
I'll give it my best shot between the other funs stuff I'm up to :) Regards On Sep 23, 3:12 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Sep 22, 2011 at 8:42 PM, Super Kevy kpe...@scholarshipamerica.org wrote: The book is awesome for a Work in progress. Thanks. Will you ever consider describing how to configure some IDEs to run the script, SCITE, TEXTPAD come to mind :) Added to TODO: https://github.com/zeljkofilipin/watirbook/commit/6c6d083fc454401aadf... I am not familiar with scite or textpad, so if you are using them, feel free to write a chapter or two for the book. Full credits to you and all that. If you have further comments, please send them to watirb...@googlegroups.com. I have sent 0.7.1 announcement here by mistake. Željko -- 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: modal_dialog and win32ole
Did you get this error resolved? You may need to do system updates at the command prompt gem update --system On Sep 13, 11:30 am, Bob Loblaw wccol...@gmail.com wrote: Hi guys I was just testing out some scenarios with modal_dialog and everything was working perfectly so I copied it over to my main script and everything failed. The error that came up was: C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/modal_dialog.rb: 32:in `locate': undefined method `connect_unknown' for WIN32OLE:Class (NoMethodError) from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ modal_dialog.rb:36:in `document' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ modal_dialog.rb:41:in `title' from test.rb:18 When I removed the require 'win32ole' from my test, everything worked again. Does anyone know why this is the case? Here is my simple test to show you what I mean. This code will attach itself to an open page called Assignment and then click on a button to load a new modal page This code works = require 'rubygems' require 'watir' browser = Watir::IE.attach(:title, /Assignment/) browser.image(:id, new_initiativeid).click_no_wait puts browser.modal_dialog(:title, Look Up Records).exists? puts browser.modal_dialog(:title, Look Up Records).title puts browser.modal_dialog(:title, Look Up Records).url browser.modal_dialog(:title, Look Up Records).show_all_objects But this code does not work = require 'rubygems' require 'watir' require 'win32ole' browser = Watir::IE.attach(:title, /Assignment/) browser.image(:id, new_initiativeid).click_no_wait puts browser.modal_dialog(:title, Look Up Records).exists? puts browser.modal_dialog(:title, Look Up Records).title puts browser.modal_dialog(:title, Look Up Records).url browser.modal_dialog(:title, Look Up Records).show_all_objects I am using ruby 1.8.7 and WATIR 2.0.2 -- 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: modal_dialog and win32ole
Modal Dialogs should be bugs. Most people (myself included) dislike them. On Fri, Sep 23, 2011 at 1:42 PM, Super Kevy kpe...@scholarshipamerica.org wrote: Did you get this error resolved? You may need to do system updates at the command prompt gem update --system On Sep 13, 11:30 am, Bob Loblaw wccol...@gmail.com wrote: Hi guys I was just testing out some scenarios with modal_dialog and everything was working perfectly so I copied it over to my main script and everything failed. The error that came up was: C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/modal_dialog.rb: 32:in `locate': undefined method `connect_unknown' for WIN32OLE:Class (NoMethodError) from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ modal_dialog.rb:36:in `document' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ modal_dialog.rb:41:in `title' from test.rb:18 When I removed the require 'win32ole' from my test, everything worked again. Does anyone know why this is the case? Here is my simple test to show you what I mean. This code will attach itself to an open page called Assignment and then click on a button to load a new modal page This code works = require 'rubygems' require 'watir' browser = Watir::IE.attach(:title, /Assignment/) browser.image(:id, new_initiativeid).click_no_wait puts browser.modal_dialog(:title, Look Up Records).exists? puts browser.modal_dialog(:title, Look Up Records).title puts browser.modal_dialog(:title, Look Up Records).url browser.modal_dialog(:title, Look Up Records).show_all_objects But this code does not work = require 'rubygems' require 'watir' require 'win32ole' browser = Watir::IE.attach(:title, /Assignment/) browser.image(:id, new_initiativeid).click_no_wait puts browser.modal_dialog(:title, Look Up Records).exists? puts browser.modal_dialog(:title, Look Up Records).title puts browser.modal_dialog(:title, Look Up Records).url browser.modal_dialog(:title, Look Up Records).show_all_objects I am using ruby 1.8.7 and WATIR 2.0.2 -- 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 -- 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: Newbie Dilemma
Bala On Sep 21, 8:18 am, bala balachandran.kan...@gmail.com wrote: 1. If I select Watir-Webdriver, can also use the same test script with Watir. I do understand that there will be limitations. But will it require a huge change in the commands that access page elements, doing some actions etc. We will be using multiple browsers along with it different versions. Answer: Yes, but you will need to account for the differences between Watir and Watir-WebDriver. The majority of methods are supported on either, but some do differ, or only exist in one or the other. For a script to run with either put them inside if statements so that the correct block of code, (specific to one or the other), is executed based on which one is being used. 2. Our Dev env's are user/password based while Test is certificate based. Is it really possible to use some tools like autoit to navigate through certificate list and select one. Answer: On Windows is should, but you might look into using the Rautomation gem instead, as it is now installed with Watir 1.9.2 or later, and AutoIt is no longer part of Watir, but can still be accessed with Rautomation) 4. Is it possible to make use of developer's machine to perform distributed execution without interfering their work routine?. Answer: Probably not. Watir / FireWatir and even Watir-WebDriver will open a web browser window. The Developer will probably be annoyed by a browser opening an running. You can run headless but as has been pointed out on this froum in the past, you are then not testing against either IE or Firefox, but against the headless browser. Sorry can't help you on your other questions with definite answers. Joe -- 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: modal_dialog and win32ole
Watir handles modal dialogs by compiling a custom version of win32ole that allows us to access the DOM. When you require win32ole it looks like it's overwriting a method we've defined. We could probably handle this better so our sample doesn't fail, but in any case the require 'win32ole' is unnecessary - watir is already including it and you should be able to make direct calls to the win32ole without issue. Hugh -- 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