Re: [wtr-general] Error message while typing the command require 'Watir'
On Fri, Nov 26, 2010 at 12:34 PM, sudeep pattnaik sudeeppattn...@gmail.com wrote: after writing require rubygems it is returning the value as true. Are you saying everything works now? Ž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: Watir Console issues
Done On Sun, Nov 28, 2010 at 11:00 PM, b...@pettichord.com bpettich...@gmail.com wrote: I will maintain this. Could you please open up a Jira ticket with details. You can assign it to me. Bret On Nov 27, 1:22 pm, Alan Baird aba...@bairdsnet.net wrote: Enriquem - A very simple/hacky fix is to remove -r watir/irb-history from the last line (line 7) of watir-console. This will disable sending irb commands to 'console.log'. I doubt you use this. For some reason, it seems that in 1.8.7, the Readline module has a class History inserted in it which is throwing the error message you see (in ruby you can't define a Module with the same name as an existing class). Since this particular part of watir-console was pulled from an old blog post athttp://blog.nicksieger.com/articles/2006/04/23/tweaking-irb, I'm not sure there is a fix for it. Maybe your Google skills are better than mine. It seems that the readlines module is a lot larger than it was in 1.8.6. I tried to see if I could fix this. One fix seemed to be to change line 3 in irb-history.rb to use a Class instead of a Module. This doesn't give me the error message, but the functionality suggests that it should write my commands to 'console.log' - which it doesn't. Oddly enough, I couldn't get this to work at all in 1.8.6. Maybe somebody that actually uses this could shed some light on this? I actually use watir-console a lot, but mainly because I don't like typing require 'watir' all the time in irb. Chopping this functionality out of watir-console would get it to not produce the error messages and be useful for what I want. I really don't see why letting this stay would be that big of a deal. It's only 7 lines of code. But then again, I had to patch my version of code to have --noreadline on the end instead of --readline since it will mess up on windows if you type in a large string (say 80 chars). Maybe there is a better way... Alan -- 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] Opening new browser window from existing one
Hello all, Can we open a new browser window from the existing one using Firewatir for Linux and for Watir for windows: Following are my gem versions: firewatir (1.6.7, 1.6.5) Following is my code: require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) sleep 5 *Browser.attach(:title, '/test123/')* #Browser.link(:href, /users/new).click Browser.text_field(:name, user[name]).set(amit) Browser.text_field(:name, user[description]).set(Qa Engineer) Browser.select_list(:name, user[role]).select(Hr) Browser.radio(:id, user_category_hr).set Browser.button(:value, Create).click Browser.link(:href, /users).click The line which is bold is what i am doing for opening the link in new window.Actually this is a link which you can see in the next line which is commented. Now if i click on the link then it opens in the same window.What i want is when i click on the link it should open in new window. I have added the *title property* for the link as well In the Firefox-Edit-Preferences-tab i have unchecked the tab Open new windows in new tab instead But when i run the script it error is displayed as /usr/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:272:in `attach': Unable to locate window, using title and /test123/(Watir::Exception::NoMatchingWindowFoundException) from user_create.rb:9 When i inspect the link following code is displayed a title=test123 href=/users/newNew user/a -- 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] Opening new browser window from existing one
On Mon, Nov 29, 2010 at 5:13 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Browser.attach(:title, '/test123/') a title=test123 href=/users/newNew user/a If a link has title test123, it does not mean that the page that it leads to will have the same title. Inspect the page code and take a look what is inside title tag. Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- 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] Opening new browser window from existing one
Hi, Thanks for the reply. I checked page code and this is what is inside the title tag a href=/users/new view-source:http://localhost:3000/users/new title=test123New user/a This is also what i have written in the code. On Mon, Nov 29, 2010 at 9:49 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Nov 29, 2010 at 5:13 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Browser.attach(:title, '/test123/') a title=test123 href=/users/newNew user/a If a link has title test123, it does not mean that the page that it leads to will have the same title. Inspect the page code and take a look what is inside title tag. Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- 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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Opening new browser window from existing one
This line does not care what is on the current page: Browser.attach(:title, '/test123/') it cares what is on the page that will be opened. So, open the page that will open after clicking the link manually, and take a look what it inside it's title tag (in header). Ž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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
Hi, thanks for helping us out, Jarmo! I learned that if I attach to an IE process that is not opened by Watir::Browser.New, watir is able to locate the Window by its hwnd and attach to it. After this the problem was that the newly created ruby process itself blocked blocking the main process well. This problem went away after I changed element.rb::Element.spawned_click_no_wait_command so that I prefixed the returned command string with start. Now it is start ruby #{command}. Now it works for me on Windows 7. -- A. Vuori On 24 marras, 11:50, Arto Vuori vuo...@iki.fi wrote: Hi Kushal, I'm having exactly the same problem and I have not found a working solution. I have a need to open and interact with a modal dialog. However,click_no_waitsimply returns nil. -- A. Vuori On 21 marras, 20:29, Kushal kushal...@gmail.com wrote: Hi all, I am stuck in this problem for three days now. I need to open a modal dialog from a button on a webpage. When I use click or fire_event(onclick), execution just hangs. This is understandable as it waits for work to be completed on the modal dialog. Therefore, I am trying to useclick_no_wait, but it returns nil. I made some changes in theclick_no_waitfunction, to display the call by adding puts command on line 249 and replaced start rubyw #{command} with rubyw #{command} I get the following error on the console: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 1 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ element.rb:263 :in `click!' from -e:1 The command that is executed in the above call is: ruby -e require 'rubygems';require 'c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.6.7/lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 656538), :unique_number, 1).click! Also, I read this article (http://jira.openqa.org/browse/WTR-144) which describes how fire_event_no_wait could be added to element.rb for fire_event(onmousedown) with no wait. However, eval_in_spawned_process method is not present in PageContainer module in Watir 1.6.7. Thanks. Kushal -- 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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
I'd suggest looking at some of the other solutions listed here: http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups perhaps one of them will work better. Otherwise specific answers to each step of the IRB process that Jarmo suggests, (are you getting the right hwnd, etc) might help to figure out where things are going wrong. (if you are not attaching to the right window for example, that would cause this problem) also be aware that unique_number is not a standard means of identifying an HTML Element for watir (at least I don't see it listed anywhere in our docs for the methods supported by various HTML Elements). I see it referenced only in places such as in step 6 of solution #5 on the page referenced above, where the code i creating a select_no_wait method. I don't think you will be able to use that as a way to select a button to click on (at least its not listed anywhere in the docs as a 'how' for identifying a button). Others more familiar with the guts of the Watir code might correct me on this, but I suspect you might need to find another way to identify the button you are trying to cick On Nov 28, 12:00 pm, Kushal kushal...@gmail.com wrote: Hi Jarmo, Thanks for your post. But, I still get the same error i.e. Watir::Exception::UnknownObjectException: Unable to locate element, using :unique_number, 1 when I use: require watir b = Watir::Browser.attach :title, /title/ b.button(:unique_number, 1).click Thanks. Kushal On Nov 25, 11:03 am, Jarmo Pertman jarm...@gmail.com wrote: #click_no_wait returning nil is a correct behavior. Open up the page in your browser where that button is and then open up an irb session and try this: require watir b = Watir::Browser.attach :title, /title/ b.button(:unique_number, 1).click Does that do anything or does it throw the same error message as with #click_no_wait? If it stays blocking then open up yet another irb session (because the previous is unusable due to blocking) and try again to set $DEBUG=true and perform #click_no_wait to see the handle to the IE. Now attach again to the window and see if that hwnd matches to your window's hwnd: b = Watir::Browser.attach :title, /title/ # verify that you have the correct window b.title b.url # now verify that the hwnd matches to the hwnd used by #click_no_wait b.hwnd # now try the attach command by #click_no_wait b = Watir::IE.attach(:hwnd, THE_HWND) # try to access the button b.button(:unique_number, 1).html Jarmo Pertman - IT does really matter -http://www.itreallymatters.net On Nov 24, 11:50 am, Arto Vuori vuo...@iki.fi wrote: Hi Kushal, I'm having exactly the same problem and I have not found a working solution. I have a need to open and interact with a modal dialog. However, click_no_wait simply returns nil. -- A. Vuori On 21 marras, 20:29, Kushal kushal...@gmail.com wrote: Hi all, I am stuck in this problem for three days now. I need to open a modal dialog from a button on a webpage. When I use click or fire_event(onclick), execution just hangs. This is understandable as it waits for work to be completed on the modal dialog. Therefore, I am trying to useclick_no_wait, but it returns nil. I made some changes in theclick_no_waitfunction, to display the call by adding puts command on line 249 and replaced start rubyw #{command} with rubyw #{command} I get the following error on the console: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 1 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ element.rb:263 :in `click!' from -e:1 The command that is executed in the above call is: ruby -e require 'rubygems';require 'c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.6.7/lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 656538), :unique_number, 1).click! Also, I read this article (http://jira.openqa.org/browse/WTR-144) which describes how fire_event_no_wait could be added to element.rb for fire_event(onmousedown) with no wait. However, eval_in_spawned_process method is not present in PageContainer module in Watir 1.6.7. Thanks. Kushal- Hide quoted text - - Show quoted text - -- 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: Option in select
Another option might be to use the 'select_item_in_select_list' method but from what I'm seeing that only lets you select it by either the displayed label (:text) or the underlying value (:value) see http://rdoc.info/gems/watir/1.6.7/Watir/SelectList#select_item_in_select_list-instance_method Is there a particular reason you need to use title? How would a normal user know which option item in the select list they wanted to choose? On Nov 24, 3:35 pm, orde ohil...@gmail.com wrote: I don't ever find myself using xpath, but you could look here:http://wiki.openqa.org/display/WTR/XPath Hope it helps. orde On Nov 24, 3:01 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote: I am not sure I know how. could I get help on that? On Nov 24, 1:16 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Nov 23, 2010 at 8:47 PM, Shlomit Gazit shlomitpatr...@gmail.com wrote: Is there an option to use title for option? This is the html code: option id=http://semanticweb.databaserepublic.com/c2p/systemData/ searchField#attachmentTargetItself value=341 title=true,Inner Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option Did you try? Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them- Hide quoted text - - Show quoted text - -- 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] Error while installing Watir on Windows 7
Hi I just wanted to share a problem before you so i am here.While installing watir on my windows 7 machine, i came across the attached screen when used command -gem install watir.I am not sure whether this is an error or everything is all right . Please have a look at attached file and let me know is it an error? thanks abhirevo -- 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 attachment: Watir installation.png
Re: [wtr-general] Error while installing Watir on Windows 7
I can say that it isn't an error, perhaps this warning messages tell that not every gems functionality supported on Windows 7. I have same notifications while setting up watir on Windows7, how ever, after installations, watir works normally. You can additionally use DevKit before any gem installation, see this linkhttps://github.com/oneclick/rubyinstaller/wiki/Development-Kit. You can get latest DevKit from here http://rubyinstaller.org/downloads. Best regards, Sergii 2010/11/29 abhirevo1 abhi.r...@gmail.com Hi I just wanted to share a problem before you so i am here.While installing watir on my windows 7 machine, i came across the attached screen when used command -gem install watir.I am not sure whether this is an error or everything is all right . Please have a look at attached file and let me know is it an error? thanks abhirevo -- 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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Error while installing Watir on Windows 7
I don't have a Windows 7 VM or box that I can try it on. My only guess is those are warnings, not real errors. Charley Baker Lead Developer, Watir, http://watir.com On Mon, Nov 29, 2010 at 12:24 PM, Сергей Демьянчук sergeydemjanc...@gmail.com wrote: I can say that it isn't an error, perhaps this warning messages tell that not every gems functionality supported on Windows 7. I have same notifications while setting up watir on Windows7, how ever, after installations, watir works normally. You can additionally use DevKit before any gem installation, see this link. You can get latest DevKit from here. Best regards, Sergii 2010/11/29 abhirevo1 abhi.r...@gmail.com Hi I just wanted to share a problem before you so i am here.While installing watir on my windows 7 machine, i came across the attached screen when used command -gem install watir.I am not sure whether this is an error or everything is all right . Please have a look at attached file and let me know is it an error? thanks abhirevo -- 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 -- 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: Rdoc for Wait and ElementExtensions in Watir 1.6.7
The RDoc entries for Watir 1.6.7 wait methods (wait_until_present, wait_while_present, etc.), are found in the Commonwatir RDoc, NOT in the Watir or FIreWatir RDOcs. The Commonwatir RDoc is located in my install tree at: C:\Ruby\lib\ruby\gems\1.8\doc\commonwatir-1.6.7\rdoc\index.html Your install path may vary. You'll find the Watir::Wait and Watir::ElementExtensions in that RDoc. Joe On Nov 24, 3:52 pm, dt_nz david.tay...@sungard.com wrote: Hi, I cant find the rdoc for Watir::Wait and Watir::ElementExtensions. Can someone tell me how to generate it or where it is located locally in the ruby directories. Željko Filipin has also mentioned in another thread that its not found inhttp://rdoc.info/gems/watir/frames -- 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] Firewatir: browser.div returns #to_s method raised exception: undefined method `join' for #String:0x66f12f0
Am using ruby 1.8.6.26, watir/firewatir 1.6.5, Firefox 3.5.13 code of this form ( in fact the identical script with no changes ) panel = get_div_by_id(browser, 'data-panel' ) works fine in watir with IE but fails returning a string value #to_s method raised exception: undefined method `join' for #String: 0x66f12f0 instead of the element. Debugger shows the object ('panel') here as having a @container (FireWatir::Firefox), an @element_name (elements_DIV[5]), @how (:id), @what (data-panel), @specifiers ( [ 'index' = 1, 'id' = 'data-panel'). However @o is the string above. I've not been able to step into the firewatir code successfully (eclipse and aptana studio 2, ruby debug 4.11..) to pinpoint just what string is in the wrong place... Have tried going directly to divs[index] within the entire browser but no soap. The target html does have a couple iframes but they are outside of the tree of divisions that contains the target division. This is a show stopper... any suggestions?Unable at this time to update any gems... -- 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: Error message while typing the command require 'Watir'
You may add -rubygems into RUBYOPT environment variable to avoid requiring rubygems manually. Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Nov 29, 12:41 pm, sudeep pattnaik sudeeppattn...@gmail.com wrote: Hi, Yes.Everything is working fine now :) Thanks a lot. Sudeep. On Mon, Nov 29, 2010 at 4:02 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Nov 26, 2010 at 12:34 PM, sudeep pattnaik sudeeppattn...@gmail.com wrote: after writing require rubygems it is returning the value as true. Are you saying everything works now? Željko -- 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.comwatir-general%2bunsubscr...@goog legroups.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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
Arto Vuori: #click_no_wait is only blocking intentionally when $DEBUG is true. As soon as you use it normally (e.g. $DEBUG being false) then start rubyw is used to perform the click itself thus the change made by you should not be needed and it should work without that either. Just make sure that $DEBUG is not true :) Chuck van der Linden: unique_number is indeed not intended way of locating elements manually, but it is possible to use that in the case above where the page itself should be exactly the same when trying to find out the problem. unique_number is actually a uniqueNumber [1] property's value from the OLE object directly. That's why you can't see it mentioned anywhere in Watir's source code. [1] http://msdn.microsoft.com/en-us/library/ff728873(v=VS.85).aspx Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Nov 29, 8:16 pm, Chuck van der Linden sqa...@gmail.com wrote: I'd suggest looking at some of the other solutions listed here:http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups perhaps one of them will work better. Otherwise specific answers to each step of the IRB process that Jarmo suggests, (are you getting the right hwnd, etc) might help to figure out where things are going wrong. (if you are not attaching to the right window for example, that would cause this problem) also be aware that unique_number is not a standard means of identifying an HTML Element for watir (at least I don't see it listed anywhere in our docs for the methods supported by various HTML Elements). I see it referenced only in places such as in step 6 of solution #5 on the page referenced above, where the code i creating a select_no_wait method. I don't think you will be able to use that as a way to select a button to click on (at least its not listed anywhere in the docs as a 'how' for identifying a button). Others more familiar with the guts of the Watir code might correct me on this, but I suspect you might need to find another way to identify the button you are trying to cick On Nov 28, 12:00 pm, Kushal kushal...@gmail.com wrote: Hi Jarmo, Thanks for your post. But, I still get the same error i.e. Watir::Exception::UnknownObjectException: Unable to locate element, using :unique_number, 1 when I use: require watir b = Watir::Browser.attach :title, /title/ b.button(:unique_number, 1).click Thanks. Kushal On Nov 25, 11:03 am, Jarmo Pertman jarm...@gmail.com wrote: #click_no_wait returning nil is a correct behavior. Open up the page in your browser where that button is and then open up an irb session and try this: require watir b = Watir::Browser.attach :title, /title/ b.button(:unique_number, 1).click Does that do anything or does it throw the same error message as with #click_no_wait? If it stays blocking then open up yet another irb session (because the previous is unusable due to blocking) and try again to set $DEBUG=true and perform #click_no_wait to see the handle to the IE. Now attach again to the window and see if that hwnd matches to your window's hwnd: b = Watir::Browser.attach :title, /title/ # verify that you have the correct window b.title b.url # now verify that the hwnd matches to the hwnd used by #click_no_wait b.hwnd # now try the attach command by #click_no_wait b = Watir::IE.attach(:hwnd, THE_HWND) # try to access the button b.button(:unique_number, 1).html Jarmo Pertman - IT does really matter -http://www.itreallymatters.net On Nov 24, 11:50 am, Arto Vuori vuo...@iki.fi wrote: Hi Kushal, I'm having exactly the same problem and I have not found a working solution. I have a need to open and interact with a modal dialog. However, click_no_wait simply returns nil. -- A. Vuori On 21 marras, 20:29, Kushal kushal...@gmail.com wrote: Hi all, I am stuck in this problem for three days now. I need to open a modal dialog from a button on a webpage. When I use click or fire_event(onclick), execution just hangs. This is understandable as it waits for work to be completed on the modal dialog. Therefore, I am trying to useclick_no_wait, but it returns nil. I made some changes in theclick_no_waitfunction, to display the call by adding puts command on line 249 and replaced start rubyw #{command} with rubyw #{command} I get the following error on the console: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 1 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ element.rb:263 :in `click!' from -e:1 The command that is executed in the above call is: ruby -e require 'rubygems';require 'c:/ruby/lib/ruby/gems/1.8/gems/
[wtr-general] Re: Firewatir: browser.div returns #to_s method raised exception: undefined method `join' for #String:0x66f12f0
More information: Again this occurs only in Firewatir with the _identical_ code. Unfortunately the code I am testing against is proprietary and I can't disclose. Have not reproduced in public code. Will keep trying. Can say that code is YUI based. Rubymine debug panel shows Cannot evaluate self for the current object which I assume is the (nil) div. In attempting to create the NonControlElement for the div this trace is produced: NoMethodError: undefined method `element_name' for nil:NilClass C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:276:in `locate_tagged_element' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ elements/non_control_element.rb:26:in `locate' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:964:in `exists?' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:905:in `assert_exists' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ elements/non_control_element.rb:43:in `to_s' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ commands/variables.rb:121:in `execute' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:78:in `process_context_commands' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:71:in `each' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:71:in `process_context_commands' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:70:in `catch' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:70:in `process_context_commands' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:39:in `process_commands' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:35:in `catch' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug/ processor.rb:35:in `process_commands' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:137:in `start_control' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:126:in `initialize' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:126:in `new' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:126:in `start_control' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:93:in `start_server' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/lib/ruby-debug- ide.rb:97:in `debug_program' C:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.11/bin/rdebug-ide: 87 C:\ruby\bin/rdebug-ide:19:in `load' C:\ruby\bin/rdebug-ide:19 -e:1:in `load' -e:1 -- 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] Opening new browser window from existing one
Hi, The page which is going to open has the following in the title tag. titleUsers: new/title I changed the title tag which is currently present on the page from where i am going to click. So following is displayed under title tag: titleUsers: index/title on the top AND a href=/users/new view-source:http://localhost:3000/users/new title=Users: newNew user/a --- This is the link which i am going to click.. So in the code i have changed which looks like as follows : *Browser.attach(:title, '/Users: new/')* Even changing the code i am getting the same error. On Mon, Nov 29, 2010 at 10:19 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: This line does not care what is on the current page: Browser.attach(:title, '/test123/') it cares what is on the page that will be opened. So, open the page that will open after clicking the link manually, and take a look what it inside it's title tag (in header). Ž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.comwatir-general%2bunsubscr...@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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
Ah, there seems to be a design decision between debugging click_no_wait output and breaking the method in debug mode. The latter was confusing, the former was on the other hand very helpful initially. Could there be another way of debugging the output of click_no_wait, as now it is not possible to run tests (that are using click_no_wait) in debug mode at all? Therefore, I must leave my change in place. --A. Vuori On 30 marras, 02:27, Jarmo Pertman jarm...@gmail.com wrote: Arto Vuori: #click_no_waitis only blocking intentionally when $DEBUG is true. As soon as you use it normally (e.g. $DEBUG being false) then start rubyw is used to perform the click itself thus the change made by you should not be needed and it should work without that either. Just make sure that $DEBUG is not true :) -- 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] Opening new browser window from existing one
Hi, Currently i am using FireWatir on Linux.So i am just thinking is there any problem in the code running on Linux and running it on windows. On Tue, Nov 30, 2010 at 11:54 AM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: Hi, The page which is going to open has the following in the title tag. titleUsers: new/title I changed the title tag which is currently present on the page from where i am going to click. So following is displayed under title tag: titleUsers: index/title on the top AND a href=/users/new title=Users: newNew user/a --- This is the link which i am going to click.. So in the code i have changed which looks like as follows : *Browser.attach(:title, '/Users: new/')* Even changing the code i am getting the same error. On Mon, Nov 29, 2010 at 10:19 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: This line does not care what is on the current page: Browser.attach(:title, '/test123/') it cares what is on the page that will be opened. So, open the page that will open after clicking the link manually, and take a look what it inside it's title tag (in header). Ž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.comwatir-general%2bunsubscr...@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