[wtr-general] Re: Watir 3.0.rc1 Released
Jarmo, thanks for your job :) -- 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 3.0.rc1 Released
+1 On Jan 13, 10:43 am, Ivan Kabluchkov ikabluch...@gmail.com wrote: Jarmo, thanks for your job :) -- 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 3.0.rc1 Released
So to be clear, the change to (for example) Button#text would not affect a script that uses watir-webdriver, correct? Is there any noticeable change to watir-webdriver users? Thanks for keeping people writing automation at their job instead of testing manually! On Jan 13, 1:32 am, Jarmo jarm...@gmail.com wrote: Hello everyone! I'm happy to announce that Watir isn't dead at all, since yet another version of Watir has been just released - 3.0.rc1. Its biggest goal is to conform even better with WatirSpec making it more compliant with Watir-WebDriver. Changelog: * Button#text returns value if exists instead of text * Browser#goto prepends url automatically with http:// if scheme is missing * Browser#element(s)_by_(xpath/css) are now private methods - use #element(:css = ...) and #element(:xpath = ...) instead * Browser#label supports searching by :for attribute * Browser#options method for searching option elements * Browser#body, #thead, #tfoot, #tbody, #frameset and #fieldset added * Browser#window and Browser#windows added implementing window switching API (https://github.com/jarib/watirspec/blob/master/window_switching_spec.rb ) * Element#present? returns false if exception is thrown by #exists? or #visible? * Element#style returns CSS text instead of OLE object * Element#text returns an empty string for non-visible elements * Element#parent returns correct instance of Element class (e.g. Div instead of Element) * Element#focus focuses document before focusing on the element * Element#right_click and Element#double_click added * Element#to_subtype added which returns specific instance of Watir::Element subclass * Element#send_keys added * Element#eql? as an alias for Element#== added * Element#tag_name added * ElementCollection#[] method supports negative indexes like regular Arrays * ElementCollection#[] returns always an object, even if the index is out of bounds * FileField#set and Image#save uses correct Windows file path (e.g. convert \-es into /-es) * FileField#set raises Errno::ENOENT instead of WatirException if file doesn't exist * FileField#value= as an alias for FileField#set added * Font#color, #face and #size added * Form#submit triggers onSubmit event and doesn't submit the form if event's callback returns false * Frame#execute_script added * Image#file_size, #height and #width return integer instead of a string * Image#save blocking fixed * Meta#content and #http_equiv added * Option code rewritten, causing changes in its API * SelectList code rewritten, causing changes in its API * SelectList#(selected_)options returns now Options collection instead of an array of strings * Table and its subelements code rewritten, causing changes in its API * Table#strings and #hashes added * TextField#label added * searching elements will find only correct types - e.g. using Browser#div returns only DIV element even if all other provided selectors match * all selectors and tag of the element needs to match even if searching by :id * supporting html5 data-* attributes by using :data_* for locating and #data_* for retrieving attribute values * many other internal changes Please try it out before final release of 3.0 by executing: gem install watir --pre With Best Regards, Jarmo Pertman -- 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] tightness of coupling between watir and watir-webdriver?
This question was spawned when Jarmo recently announced watir 3.0. I was trying to figure out if the changes he listed would affect my watir-webdriver scripts, and after looking at some code I'm guessing not. When I've installed watir-webdriver it seems watir is a prereq. But I noticed that (for example) Watir::Element is defined in both watir and watir-webdriver. The underlying object (the DOM element) in watir is found using watir's native tools. It looks like the underlying object in watir-webdriver is found using selenium-webdriver. So my question is what does watir add (why is the gem necessary) if you are using watir-webdriver? I'm not looking for a long technical discussion, just a quick conceptual how do they fit together kind of answer. Thanks to anyone who can provide clarity... -- 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 3.0.rc1 Released
Yes, there aren't any changes for watir-webdriver users, because that is a completely different gem, but this version should make it quite easy to run existing test scripts against Watir or Watir-WebDriver gems because both of these gems are getting more compatible with each other each day. Jarmo On Jan 13, 7:36 pm, jw joshuawal...@gmail.com wrote: So to be clear, the change to (for example) Button#text would not affect a script that uses watir-webdriver, correct? Is there any noticeable change to watir-webdriver users? Thanks for keeping people writing automation at their job instead of testing manually! On Jan 13, 1:32 am, Jarmo jarm...@gmail.com wrote: Hello everyone! I'm happy to announce that Watir isn't dead at all, since yet another version of Watir has been just released - 3.0.rc1. Its biggest goal is to conform even better with WatirSpec making it more compliant with Watir-WebDriver. Changelog: * Button#text returns value if exists instead of text * Browser#goto prepends url automatically with http:// if scheme is missing * Browser#element(s)_by_(xpath/css) are now private methods - use #element(:css = ...) and #element(:xpath = ...) instead * Browser#label supports searching by :for attribute * Browser#options method for searching option elements * Browser#body, #thead, #tfoot, #tbody, #frameset and #fieldset added * Browser#window and Browser#windows added implementing window switching API (https://github.com/jarib/watirspec/blob/master/window_switching_spec.rb ) * Element#present? returns false if exception is thrown by #exists? or #visible? * Element#style returns CSS text instead of OLE object * Element#text returns an empty string for non-visible elements * Element#parent returns correct instance of Element class (e.g. Div instead of Element) * Element#focus focuses document before focusing on the element * Element#right_click and Element#double_click added * Element#to_subtype added which returns specific instance of Watir::Element subclass * Element#send_keys added * Element#eql? as an alias for Element#== added * Element#tag_name added * ElementCollection#[] method supports negative indexes like regular Arrays * ElementCollection#[] returns always an object, even if the index is out of bounds * FileField#set and Image#save uses correct Windows file path (e.g. convert \-es into /-es) * FileField#set raises Errno::ENOENT instead of WatirException if file doesn't exist * FileField#value= as an alias for FileField#set added * Font#color, #face and #size added * Form#submit triggers onSubmit event and doesn't submit the form if event's callback returns false * Frame#execute_script added * Image#file_size, #height and #width return integer instead of a string * Image#save blocking fixed * Meta#content and #http_equiv added * Option code rewritten, causing changes in its API * SelectList code rewritten, causing changes in its API * SelectList#(selected_)options returns now Options collection instead of an array of strings * Table and its subelements code rewritten, causing changes in its API * Table#strings and #hashes added * TextField#label added * searching elements will find only correct types - e.g. using Browser#div returns only DIV element even if all other provided selectors match * all selectors and tag of the element needs to match even if searching by :id * supporting html5 data-* attributes by using :data_* for locating and #data_* for retrieving attribute values * many other internal changes Please try it out before final release of 3.0 by executing: gem install watir --pre With Best Regards, Jarmo Pertman -- 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] watirgrid and watir-webdriver-performance together?
Can watirgrid and watir-webdriver-performance be used together? I've got something like the below going, but I get a NoMethodError. All of the providers have up to date chrome and the performance gem installed. Thanks for your help in advance. Watir::Grid.control(:controller_uri = 'druby://host') do |browser, id| threads Thread.new do browser.goto @config[runSettings][url] puts Load Time for #{id}: #{browser.performance.summary[:response_time]/1000} seconds. ... -- 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 Rich text editor in our web app
I would only make a gem if you feel it would be of benefit to others etc. RUBYLIB is a name for an environment variable that tells ruby what directory to search when looking to find something you have a require statement for in the script. If you have your own utility library that you are putting somewhere on the system, you just need to create that environment variable on the system, and point it to that directory and ruby should then find your stuff when you require it in the script. On Jan 12, 5:26 pm, Joe Fleck joeflec...@gmail.com wrote: Hi Chuck, The file and scripts are stored on github for our team to use. I have pulled(clone) then down on to the windows VM. If I make changes to that class and files I need to push them back up to github for the qa team. I still about 3 to 4 months new to Watir and Ruby so I haven't done a RUBYLIB. I wonder if creating a gem with these would be a better alternative. What would I need to do for both? On Thu, Jan 12, 2012 at 5:31 PM, Chuck van der Linden sqa...@gmail.com wrote: Meh just realised you gave me what I needed,, Ignore the other response. Where is common/helpermethods installed? is that your own utility library (and not a gem) You may need to establish a 'RUBYLIB' environment variable in the windows box (let me know if you don't know how to do that) that points to the directory where you have that stuff. I use c:\lib for that kind of thing, but hey whatever works for you. avoid spaces unless you want to have to put stuff in quotes. Remember its windows/ dos and use a backslash and not slash (grin) On Jan 12, 7:54 am, Joe Fl joeflec...@gmail.com wrote: Sorry I setup a windows vm and the error above happens when I try and run the script. On Jan 12, 10:06 am, Joe Fl joeflec...@gmail.com wrote: Hi Chuck, I have set myself up with VMware Fusion and brought down my scripts and folders from github but how do I handle this? C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- common/helper_methods (LoadError) from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb: 36:in `require' from add_multiple_share_members_types.rb:7:in `main' Exit code: 1 Do I need to place the full path in the script? I use a csv file for input data in the app too. Code: # the rubygems require rubygems # the Watir webdriver controller require watir-webdriver require 'common/helper_methods' #require 'discussion/generate_sharing_data' require 'faster_csv' helper = HelperMethods.new($browser) #Call method to delete text from file name_of_file = 'multi_add_discussion_headers.txt' helper.delete_file_text(name_of_file) #Call method to delete text from file name_of_file = 'multi_add_discussion_reusable_data.txt' helper.delete_file_text(name_of_file) #Setting variable name with script name script_name = File.basename(__FILE__,.rb) Thank you, Joe On Jan 6, 7:51 pm, Chuck van der Linden sqa...@gmail.com wrote: well on a PC you can do that with either AutoIt, or Rautomation. Not so sure with the mac (although someone else may be able to help) I'm learning to be a mac user after years with windows systems, but when it comes to running watir I just do it through VM's hosted on the mac for a number of reasons, so while I technically run watir or watir- webdriver on a mac, I'm not actually running it on OSX On Jan 6, 10:57 am, Joe Fleck joeflec...@gmail.com wrote: Chuck, Thank you this was very helpful. I do have VMWare fusion so I will begin using it to run my scripts. I usually have this problem when developing my scripts. I development them in Netbeams (6.0) and run them from there. When you wrote this 'You may need to set focus to the browser window first.' did you mean manually or is there a method that will do this? Thank you, Joe On Fri, Jan 6, 2012 at 12:45 PM, Chuck van der Linden sqa...@gmail.com wrote: On Jan 6, 6:51 am, Joe Fleck joeflec...@gmail.com wrote: Hi, I have found it does work but won't if the browser is not in my admitted focus. I am using a MAC BookPro. Has anyone else experienced this? Thank you, Joe Most 'send keys' operations emulate typing at the keyboard, and are generally done at the OS level. As a result the keystrokes tend to go to whatever has focus in the UI of the system you are testing on. You may need to set focus to the browser window first. That can mean it's pretty difficult to do anything else on the system when scripts are running since you never know when you might lose focus on your current task. If you want to do other work on the system while scripts are running,
[wtr-general] Re: tightness of coupling between watir and watir-webdriver?
Here's how I understand things. The 'coupling' is that they both try to implement the same API. The API was originated by Watir, but more recently watir-webdriver has been at the foerfront there and Watir has been in catchup mode. The API is now codified in 'watirspec' which allows both tools (and for that matter anything else, like if someone wanted to start working on Safariwatir) to ensure that they work properly with the api as described in watirspec. Watirspec is I believe using the Rspec tool as the test framework etc. the tests are the documentation basically) You do not need Watir installed to use Watir-webdriver. Because they both implement the same API and pretty much the same object model, you will find that both of them have code to define a very similar (if not nearly identical) set of objects, with common inheritance etc When creating scripts you should require one or the other but NOT both at the same time. (it is possible to create one script that works with both, requiring the one that is needed based on a config file, parameter, or env variable, but that is a very different subject) The advantage of Watir is that because it drives IE differently, in some cases it seems to be better able to drive IE correctly, especially in a few cases where IE actually refuses access to the DOM from javascript based stuff for security reasons. Also for some companies, IE is the supported platform for their web-app and they don't need anything else. (Remember Watir originated years ago when IE pretty much owned the vast majority of the browser market, before webdriver existed, when just being able to drive IE was good enough for a lot of folks.) The advantage of watir-webdriver is cross browser support, also a fairly rapid update (typically) when new browser versions require some update to the drivers. For a while it might also be said that WW offered a more 'advanced' version of the Watir API, but that is less so with recent releases of Watir catching it up. The big difference in version numbers between the two projects might be a bit confusing to some users. It might be nice if we did something like establish a version for the watirspec tests, e..g. 'watirspec 3' and then both projects supporting that version of the interface were to use that as their major version number. I've not had a chance to read it yet (it's on my list) but I think Zeljko's book on Watir contains a bit of history about how the tool developed. Did that help provide any clarity, or did I just further muddy things for you? On Jan 13, 9:55 am, jw joshuawal...@gmail.com wrote: This question was spawned when Jarmo recently announced watir 3.0. I was trying to figure out if the changes he listed would affect my watir-webdriver scripts, and after looking at some code I'm guessing not. When I've installed watir-webdriver it seems watir is a prereq. But I noticed that (for example) Watir::Element is defined in both watir and watir-webdriver. The underlying object (the DOM element) in watir is found using watir's native tools. It looks like the underlying object in watir-webdriver is found using selenium-webdriver. So my question is what does watir add (why is the gem necessary) if you are using watir-webdriver? I'm not looking for a long technical discussion, just a quick conceptual how do they fit together kind of answer. Thanks to anyone who can provide clarity... -- 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: watirgrid and watir-webdriver-performance together?
details of the error might help to determine the cause of the problem On Jan 13, 1:13 pm, Dan dfra...@gmail.com wrote: Can watirgrid and watir-webdriver-performance be used together? I've got something like the below going, but I get a NoMethodError. All of the providers have up to date chrome and the performance gem installed. Thanks for your help in advance. Watir::Grid.control(:controller_uri = 'druby://host') do |browser, id| threads Thread.new do browser.goto @config[runSettings][url] puts Load Time for #{id}: #{browser.performance.summary[:response_time]/1000} seconds. ... -- 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 3.0.rc1 Released
+1 Great work. out of curiosity, why the bump to the major version number? On Jan 13, 1:37 am, Dan Claudiu Pop danclaudiu...@gmail.com wrote: +1 On Jan 13, 10:43 am, Ivan Kabluchkov ikabluch...@gmail.com wrote: Jarmo, thanks for your job :) -- 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 3.0.rc1 Released
So what if any are the remaining big differences between the two? the handling for JS popups?? On Jan 13, 10:39 am, Jarmo Pertman jarm...@gmail.com wrote: Yes, there aren't any changes for watir-webdriver users, because that is a completely different gem, but this version should make it quite easy to run existing test scripts against Watir or Watir-WebDriver gems because both of these gems are getting more compatible with each other each day. Jarmo On Jan 13, 7:36 pm, jw joshuawal...@gmail.com wrote: So to be clear, the change to (for example) Button#text would not affect a script that uses watir-webdriver, correct? Is there any noticeable change to watir-webdriver users? Thanks for keeping people writing automation at their job instead of testing manually! On Jan 13, 1:32 am, Jarmo jarm...@gmail.com wrote: Hello everyone! I'm happy to announce that Watir isn't dead at all, since yet another version of Watir has been just released - 3.0.rc1. Its biggest goal is to conform even better with WatirSpec making it more compliant with Watir-WebDriver. Changelog: * Button#text returns value if exists instead of text * Browser#goto prepends url automatically with http:// if scheme is missing * Browser#element(s)_by_(xpath/css) are now private methods - use #element(:css = ...) and #element(:xpath = ...) instead * Browser#label supports searching by :for attribute * Browser#options method for searching option elements * Browser#body, #thead, #tfoot, #tbody, #frameset and #fieldset added * Browser#window and Browser#windows added implementing window switching API (https://github.com/jarib/watirspec/blob/master/window_switching_spec.rb ) * Element#present? returns false if exception is thrown by #exists? or #visible? * Element#style returns CSS text instead of OLE object * Element#text returns an empty string for non-visible elements * Element#parent returns correct instance of Element class (e.g. Div instead of Element) * Element#focus focuses document before focusing on the element * Element#right_click and Element#double_click added * Element#to_subtype added which returns specific instance of Watir::Element subclass * Element#send_keys added * Element#eql? as an alias for Element#== added * Element#tag_name added * ElementCollection#[] method supports negative indexes like regular Arrays * ElementCollection#[] returns always an object, even if the index is out of bounds * FileField#set and Image#save uses correct Windows file path (e.g. convert \-es into /-es) * FileField#set raises Errno::ENOENT instead of WatirException if file doesn't exist * FileField#value= as an alias for FileField#set added * Font#color, #face and #size added * Form#submit triggers onSubmit event and doesn't submit the form if event's callback returns false * Frame#execute_script added * Image#file_size, #height and #width return integer instead of a string * Image#save blocking fixed * Meta#content and #http_equiv added * Option code rewritten, causing changes in its API * SelectList code rewritten, causing changes in its API * SelectList#(selected_)options returns now Options collection instead of an array of strings * Table and its subelements code rewritten, causing changes in its API * Table#strings and #hashes added * TextField#label added * searching elements will find only correct types - e.g. using Browser#div returns only DIV element even if all other provided selectors match * all selectors and tag of the element needs to match even if searching by :id * supporting html5 data-* attributes by using :data_* for locating and #data_* for retrieving attribute values * many other internal changes Please try it out before final release of 3.0 by executing: gem install watir --pre With Best Regards, Jarmo Pertman -- 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: watirgrid and watir-webdriver-performance together?
I didn't get much more than the no method error, but I'll post more details when I get back to the office. -- 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: Segmentation fault when using thread, watir, and Tk
Thanks, John. I just need some simple GUI from Tk. It seems that I can't do it with watir. So I may just go for watij (Java). On Jan 11, 4:20 pm, John Fitisoff jfitis...@yahoo.com wrote: Not sure what's going on there but probably worth mentioning that there are some existing alternatives. I think Test::Unit has a built-in Tk test runner, although I've never used it. You may also want to consider using Eclipse with the Dynamic Languages Toolkit (DLTK) plugin. The IDE has a built-in test runner and some people I know like it. I haven't used that either though. I typically just run things from a console. From: Barry barry...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Wednesday, January 11, 2012 1:04 PM Subject: [wtr-general] Segmentation fault when using thread, watir, and Tk I use Tk to create GUI to invoke watir. When I click a button, IE window should be opened. To avoid the freezing UI, I put it into a new thread. This worked until everything finished and I closed Tk window. There will be segmentation fault. I am not familar with Thread in Ruby. Should I clean something after a thread is done? Here is the simplified code. If you run this code, you will get a segmentation erro when closing the Tk window. require 'tk' require 'watir' root = TkRoot.new() { title test watir } Thread.new{ browser = Watir::IE.new sleep(2) browser.close} Tk.mainloop() Here is the error msg: segerr.rb: [BUG] Segmentation fault ruby 1.9.3p0 (2011-10-30) [i386-mingw32] -- Control frame information --- c:0001 p: s:0002 b:0002 l:001bd4 d:001bd4 TOP -- C level backtrace information --- C:\Windows\SysWOW64\ntdll.dll(NtWaitForSingleObject+0x15) [0x77a5f8c1] C:\Windows\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x75571194] C:\Windows\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x75571148] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e5acc9 ] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new +0x17a) [0x62 d3a68e] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d3b3ef] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_check_safe_str +0x1a4) [0x62ded 27c] [0x004011e6] C:\Users\mememe\Ruby193tk\lib\ruby\gems\1.9.1\gems\watir-2.0.4\lib \watir\IEDialog\ Release\IEDialog.dll(DoButtonClick+0x5215) [0x10006985] C:\Windows\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x77ab21d7] -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.comhttp://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