[wtr-general] Code Swarm visualization of Watir project
Did a pretty cool code swarm visualization of Watir project. Check out the blog @ http://developer-in-test.blogspot.com/2009/11/code-swarm-visualization-of-watir.html or video @ http://www.vimeo.com/7567626 --Sai Fork me @ http://github.com/saivenkat --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Unable to pass Variable in Autoit ControlSend command resulting in blank
Try using autoit.ControlSetText(Open URL, , Edit1, playUrl) and playUrl and $playUrl are different variables they are not one and the same On Thu, Nov 12, 2009 at 11:05 AM, qalive365 pradg...@gmail.com wrote: Hi, I am using Watir in conjucntion with Autoit. I Capture a URL from XML output and pass it to the Module method which launches Winamp application and then use this URL to launch the stream. Here is my code for the module: require watir require 'watir/testcase' require win32/process # opening and closind applications require win32ole autoit=WIN32OLE.new(AutoItX3.Control) # module to launch play url using winamp, needs to pass play url module LaunchPlayUrl def LaunchPlayUrl.launchPlayUrl(playUrl) # Launch Winamp application autoit=WIN32OLE.new(AutoItX3.Control) autoit.Run('C:\Program Files\Winamp\winamp.exe') # another post indicated double quotes do not work as in actual autoit script use single instead works. #Activate Winamp window autoit.WinWaitActive(Winamp 5.56) autoit.Send(^l) autoit.WinWaitActive(Open URL) autoit.ControlSend(Open URL, , Edit1, $playUrl) autoit.sleep(5000) autoit.ControlClick(Open URL, Open, Button1) end end Launches Winamp fine and also launches Edit Box to paste URL fine but prints null in the edit box not passing the playUrl value, I tried passing playUrl rather than $PlayUrl etc but does not work. Please help me figure out what I am doing wrong. Thanks --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: JSSH on FF 3.0.14
Le mardi 10 novembre de l'année 2009, vers 11 heures et 08 minutes, Alexandre Delanoë écrivait: Hi all, I have 3.0.14-1 firefox on a debian testing box. Then I installed : http://wiki.openqa.org/download/attachments/13893658/jssh-20080725-Linux.xpi?version=1 In a terminal I launch the command: firefox -jssh Then telnet localhost 9997 is Unable to connect to remote host: Connection refused Error console indicates that Components.classes['@mozilla.org/jssh-server;1'] is undefined in Source File: file:///home/user/.mozilla/firefox/.default/extensions/j...@extensions.mozilla.org/components/nsJSShStarter.js Line: 133 Code: JSShStarter.prototype = { // nsICommandLineHandler methods: handle : function(commandline) { debug(JSShStarter: checking for -jssh startup option\n); if (commandline.handleFlag(jssh, false)) { // start a jssh server with startupURI // chrome://jssh/content/jssh-debug.js. We use 'getService' // instead of 'createInstance' to get a well-known, globally // accessible instance of a jssh-server. // XXX Todo: get port, startupURI and loopbackOnly from prefs. Components.classes[@mozilla.org/jssh-server;1] .getService(Components.interfaces.nsIJSShServer) .startServerSocket(9997, chrome://jssh/content/jssh-debug.js, true); debug(JSShStarter: JSSh server started on port 9997\n); } }, helpInfo : -jsshStart a JSSh server on port 9997.\n, }; Any idea to fix this ? Thank you for help. -- Alexandre Delanoë --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: JSSH on FF 3.0.14
Did you tried using Latest version of Firefox 3.5 along with the JSSh for 3.5? Also are you an administrator while installing the extension? - Angrez On Thu, Nov 12, 2009 at 3:08 PM, Alexandre neonoe123...@gmail.com wrote: Le mardi 10 novembre de l'année 2009, vers 11 heures et 08 minutes, Alexandre Delanoë écrivait: Hi all, I have 3.0.14-1 firefox on a debian testing box. Then I installed : http://wiki.openqa.org/download/attachments/13893658/jssh-20080725-Linux.xpi?version=1 In a terminal I launch the command: firefox -jssh Then telnet localhost 9997 is Unable to connect to remote host: Connection refused Error console indicates that Components.classes['@mozilla.org/jssh-server;1'] is undefined in Source File: file:///home/user/.mozilla/firefox/.default/extensions/ j...@extensions.mozilla.org/components/nsJSShStarter.js Line: 133 Code: JSShStarter.prototype = { // nsICommandLineHandler methods: handle : function(commandline) { debug(JSShStarter: checking for -jssh startup option\n); if (commandline.handleFlag(jssh, false)) { // start a jssh server with startupURI // chrome://jssh/content/jssh-debug.js. We use 'getService' // instead of 'createInstance' to get a well-known, globally // accessible instance of a jssh-server. // XXX Todo: get port, startupURI and loopbackOnly from prefs. Components.classes[@mozilla.org/jssh-server;1] .getService(Components.interfaces.nsIJSShServer) .startServerSocket(9997, chrome://jssh/content/jssh-debug.js, true); debug(JSShStarter: JSSh server started on port 9997\n); } }, helpInfo : -jsshStart a JSSh server on port 9997.\n, }; Any idea to fix this ? Thank you for help. -- Alexandre Delanoë --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: regarding delay in browser response time
On Wed, Nov 11, 2009 at 7:57 PM, ravi ravi8...@gmail.com wrote: when i use sleep command it passes can you suggest me any other way apart from sleep command http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir Željko -- watir.com - community manager watirpodcast.com - host --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: JSSH on FF 3.0.14
Le jeudi 12 novembre de l'année 2009, vers 16 heures et 03 minutes, Angrez Singh écrivait: Did you tried using Latest version of Firefox 3.5 along with the JSSh for 3.5? Yes I tried but the issue is the same. Also are you an administrator while installing the extension? I do not install it as root. (I do not want to start X session as root). But as user, it was ok with my previous computer... -- Alexandre Delanoë --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] FireWatir status method gives error in 1.6.5
irb(main):001:0 require 'watir' = true irb(main):002:0 Watir::Browser.default = 'firefox' = firefox irb(main):003:0 $browser = Watir::Browser.new = #FireWatir::Firefox:0x3279518 url=about:blank title= irb(main):004:0 $browser.status NameError: uninitialized constant FireWatir::Firefox::WINDOW_VAR from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/ active_support/dependencies.rb:105:in `const_missing' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/firefox.rb:460:in `status' from (irb):4 Environment: Ruby 1.8.6 FF 3.5.5 WinXP --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: FireWatir status method gives error in 1.6.5
Seems like WINDOW_VAR in status method should be typed in lower case. Then it works. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: JSSH on FF 3.0.14
But as user, it was ok with my previous computer... Can you tell what are you doing different this time? - Angrez --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir Help
hahahahahhaha very funny, hire a private dectivtive,...I know that the letter 'a' was missing before but after several reinstalls of ruby I did not bother to apply the fix to put the letter 'a' back onbut thanks for the comment. On Nov 9, 3:15 pm, Ethan notet...@gmail.com wrote: Somebody seems to be stealing all of your letters 'a'. Watir needs these, otherwise it's just 'wtir', and lacking the 'application' part can't do anything. I suggest you hire a privte detective to track down where all of your 'a's are disappearing to. The police are no help with this sort of thing - they have no 'a' in their name, and don't care. On Mon, Nov 9, 2009 at 15:29, tester86 sagar.am...@gmail.com wrote: Using cucumber and watir - Vista and Windows 7 Get the following error message: Unble to locte element, using :nme, q (Wtir::Exception::UnknownObjectException) ./fetures/step_definitions/serch_steps.rb:11:in `/I serch for (.*)/'fetures/serch.feture:8:in `When I serch for cucumber github' Then I should see BDD tht tlks to domin experts first nd code second # fet ures/step_definitions/serch_steps.rb:15 Anyone have any basic watir scripts that I can use with cucumber- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Really....Ruby + Watir + Command Line
Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I execute the script I get the error mentioned above. Thanks On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Please try to use slep(10) commands. It means ie.goto(htp://google.com) sleep(10) ie.text_field(:name,q).set(Raveendran) sleep(10) . . . I hope it works now. Rit ? On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote: Another Error From Command Prompt: ## Beginning of test: Google search Step 1: go to the test site:http://www.google.com Action: enteredhttp://www.google.comin the address bar. Action: WaitForPageToLoad c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:323:in `set' from script1.rb:28 I never had any problems when I was using watir on windows xp, I am not 100% sure but is there any configuration for windows vista or any known issue because when using IE Developer Toolbar I am able to find the link q on the page On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote: Bret, My script is going to the google URL, but for some reason it cannot find the text box. I have tried all the examples but I get the following output: broswer.url browser.text script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0 (NoMethodError) same for when I use ie.text_field(:name, q).set(pickaxe) Do you have any idea why it cannot find that text box? On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote: My guess is that the browser is not actually on the google page at this point. You could use statements like this to help troubleshoot: puts browser.text puts browser.url puts browser.title Bret tester86 wrote: Thanks for all the help I managed to get ruby and watir all up and running. But I have a question, when I was using cucumber I get this error message and they told me to put this post in the watir group: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:323:in `set' from script1.rb:8 When you have a watir script why cannot find the text box and the search box for google.My script is still the same. Is there some other syntax that I need to use? -- Bret Pettichord Lead Developer, Watir,www.watir.com Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog Twitter,www.twitter.com/bpettichord-Hidequoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- Regards, P.Raveendranhttp://raveendran.wordpress.com- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General
[wtr-general] Watir IDE Recorder
Hi. I went to download the watir ide recorder and it mentioned it requires .net framework 1.4 and then I installed the .net framework. Then I went to install watir ide recorder it told me again I need the .net framwork but I hvae already installed it. I have done a windows secuirty update, but still the set up is not working. Any ideas... --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir IDE Recorder
On Thu, Nov 12, 2009 at 4:20 PM, tester86 sagar.am...@gmail.com wrote: I went to download the watir ide recorder Watir recorder is not supported here. Please post to their support list. If you can not find it, let me know and I will try to find it. Željko -- watir.com - community manager watirpodcast.com - host --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: FireWatir status method gives error in 1.6.5
Thanks for the report and the fix. Who can commit this fix? Bret al3kc wrote: Seems like WINDOW_VAR in status method should be typed in lower case. Then it works. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: FireWatir status method gives error in 1.6.5
We also need to add a unit test for the status method. I know we have one for the IE status method. Bret Bret Pettichord wrote: Thanks for the report and the fix. Who can commit this fix? Bret al3kc wrote: Seems like WINDOW_VAR in status method should be typed in lower case. Then it works. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Unable to pass Variable in Autoit ControlSend command resulting in blank
Hi Bhavana I did try that but when I am passing global variable it is still passing null with ControlSetText. On Thu, Nov 12, 2009 at 1:21 AM, Basavana Gowda K S bas.go...@gmail.comwrote: Try using autoit.ControlSetText(Open URL, , Edit1, playUrl) and playUrl and $playUrl are different variables they are not one and the same On Thu, Nov 12, 2009 at 11:05 AM, qalive365 pradg...@gmail.com wrote: Hi, I am using Watir in conjucntion with Autoit. I Capture a URL from XML output and pass it to the Module method which launches Winamp application and then use this URL to launch the stream. Here is my code for the module: require watir require 'watir/testcase' require win32/process # opening and closind applications require win32ole autoit=WIN32OLE.new(AutoItX3.Control) # module to launch play url using winamp, needs to pass play url module LaunchPlayUrl def LaunchPlayUrl.launchPlayUrl(playUrl) # Launch Winamp application autoit=WIN32OLE.new(AutoItX3.Control) autoit.Run('C:\Program Files\Winamp\winamp.exe') # another post indicated double quotes do not work as in actual autoit script use single instead works. #Activate Winamp window autoit.WinWaitActive(Winamp 5.56) autoit.Send(^l) autoit.WinWaitActive(Open URL) autoit.ControlSend(Open URL, , Edit1, $playUrl) autoit.sleep(5000) autoit.ControlClick(Open URL, Open, Button1) end end Launches Winamp fine and also launches Edit Box to paste URL fine but prints null in the edit box not passing the playUrl value, I tried passing playUrl rather than $PlayUrl etc but does not work. Please help me figure out what I am doing wrong. Thanks --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: JSSH on FF 3.0.14
Le jeudi 12 novembre de l'année 2009, vers 18 heures et 14 minutes, Angrez Singh écrivait: But as user, it was ok with my previous computer... Can you tell what are you doing different this time? I do not really know... I just installed a new version of Debian Linux of my new laptop. Everything is working but this issue. -- Alexandre Delanoë --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Really....Ruby + Watir + Command Line
The error message is saying that it can't find the text field with the name 'q'. For some reason, it doesn't exist in the browser contained by your variable ie. Are you sure that your browser is on the page you think it is? One way to troubleshoot this is with an irb session. Run your test and when it fails, open an irb session in a command prompt. Then try the following commands: require 'watir' ie = Watir::IE.find(:title, /Google/) ie.text_field(:name,'q').exists? I've copied both of your scripts into an irb session and they ran without any problems - even without the sleep commands (you shouldn't need those). Try stepping through your scripts, line by line in irb so you can watch what happens in with each step. Hope this helps, -Tiffany On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote: Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I execute the script I get the error mentioned above. Thanks On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Please try to use slep(10) commands. It means ie.goto(htp://google.com) sleep(10) ie.text_field(:name,q).set(Raveendran) sleep(10) . . . I hope it works now. Rit ? On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote: Another Error From Command Prompt: ## Beginning of test: Google search Step 1: go to the test site:http://www.google.com Action: enteredhttp://www.google.cominthe address bar. Action: WaitForPageToLoad c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:323:in `set' from script1.rb:28 I never had any problems when I was using watir on windows xp, I am not 100% sure but is there any configuration for windows vista or any known issue because when using IE Developer Toolbar I am able to find the link q on the page On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote: Bret, My script is going to the google URL, but for some reason it cannot find the text box. I have tried all the examples but I get the following output: broswer.url browser.text script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0 (NoMethodError) same for when I use ie.text_field(:name, q).set(pickaxe) Do you have any idea why it cannot find that text box? On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote: My guess is that the browser is not actually on the google page at this point. You could use statements like this to help troubleshoot: puts browser.text puts browser.url puts browser.title Bret tester86 wrote: Thanks for all the help I managed to get ruby and watir all up and running. But I have a question, when I was using cucumber I get this error message and they told me to put this post in the watir group: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?'
[wtr-general] install for 1.6.2 doesn't work after 1.6.5 release
This morning I was helping a coworker get some things up and running with watir and noticed that he had inadvertently got 1.6.5. Since 1.6.5 changes the way .visible? works, we decided to go back to 1.6.2 and make sure everything was ok there. We removed watir, commonwatir and firewatir and verified that everything was uninstalled. After that, we did the following: C:\ gem install watir -v 1.6.2 ERROR: Error installing watir: firewatir requires commonwatir (= 1.6.5, runtime) C:\ gem list --local *** LOCAL GEMS *** (removed unnecessary gems) ... commonwatir (1.6.2) ... C:\ gem install firewatir -v 1.6.2 Successfully installed firewatir-1.6.2 1 gem installed Installing ri documentation for firewatir-1.6.2... Installing RDoc documentation for firewatir-1.6.2... C:\ gem install watir -v 1.6.2 Successfully installed watir-1.6.2 1 gem installed Installing ri documentation for watir-1.6.2... Installing RDoc documentation for watir-1.6.2... So, to me it seems that there is a gem dependency in the firewatir install for commonwatir 1.6.5 (or maybe it's just the latest version). What do you think? Alan This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: install for 1.6.2 doesn't work after 1.6.5 release
Hello, I too had the same problem the I just installed commonwatir 1.6.5 and the installed watir -v 1.6.2 it let me do the installation but when i ran the previously running script it faild stating no such file to laod watir/ie Any suggestions thanx in advance regards ravi On Thu, Nov 12, 2009 at 12:58 PM, Alan Baird alan.ba...@riskmetrics.comwrote: This morning I was helping a coworker get some things up and running with watir and noticed that he had inadvertently got 1.6.5. Since 1.6.5 changes the way .visible? works, we decided to go back to 1.6.2 and make sure everything was ok there. We removed watir, commonwatir and firewatir and verified that everything was uninstalled. After that, we did the following: C:\ gem install watir -v 1.6.2 ERROR: Error installing watir: firewatir requires commonwatir (= 1.6.5, runtime) C:\ gem list --local *** LOCAL GEMS *** (removed unnecessary gems) ... commonwatir (1.6.2) ... C:\ gem install firewatir -v 1.6.2 Successfully installed firewatir-1.6.2 1 gem installed Installing ri documentation for firewatir-1.6.2... Installing RDoc documentation for firewatir-1.6.2... C:\ gem install watir -v 1.6.2 Successfully installed watir-1.6.2 1 gem installed Installing ri documentation for watir-1.6.2... Installing RDoc documentation for watir-1.6.2... So, to me it seems that there is a gem dependency in the firewatir install for commonwatir 1.6.5 (or maybe it's just the latest version). What do you think? Alan This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: FireWatir status method gives error in 1.6.5
I can commit the fix and will also add unit test for the same. Thanks, Angrez On Thu, Nov 12, 2009 at 9:08 PM, Bret Pettichord b...@pettichord.comwrote: We also need to add a unit test for the status method. I know we have one for the IE status method. Bret Bret Pettichord wrote: Thanks for the report and the fix. Who can commit this fix? Bret al3kc wrote: Seems like WINDOW_VAR in status method should be typed in lower case. Then it works. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Really....Ruby + Watir + Command Line
Thanks for you input Tiffany but when I run the script and execute in IRB I get the following error message: NameError: undefined local variable or method `ie' for main:Object Is there something I have to set to intialize IE? On what operating system did you execute the script since I have several installs of ruby and watir and nothing is working for me. When I execute the script it opens a new window, on that window nothing happens, then it goes to my other window and loads up google and throw the error message unable to find q then in IRB it shows me this message. Do you have any idea on what is happening as I have been through all the basic examples but none of my scripts are working, even though they are very low level. When I try to do ie.text_contains(valueX) if throws me back an error stating undefined method for contains. Am I missing something in my set up or is it because of vista OS? Thanks On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote: The error message is saying that it can't find the text field with the name 'q'. For some reason, it doesn't exist in the browser contained by your variable ie. Are you sure that your browser is on the page you think it is? One way to troubleshoot this is with an irb session. Run your test and when it fails, open an irb session in a command prompt. Then try the following commands: require 'watir' ie = Watir::IE.find(:title, /Google/) ie.text_field(:name,'q').exists? I've copied both of your scripts into an irb session and they ran without any problems - even without the sleep commands (you shouldn't need those). Try stepping through your scripts, line by line in irb so you can watch what happens in with each step. Hope this helps, -Tiffany On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote: Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I execute the script I get the error mentioned above. Thanks On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Please try to use slep(10) commands. It means ie.goto(htp://google.com) sleep(10) ie.text_field(:name,q).set(Raveendran) sleep(10) . . . I hope it works now. Rit ? On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote: Another Error From Command Prompt: ## Beginning of test: Google search Step 1: go to the test site:http://www.google.com Action: enteredhttp://www.google.comintheaddress bar. Action: WaitForPageToLoad c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:323:in `set' from script1.rb:28 I never had any problems when I was using watir on windows xp, I am not 100% sure but is there any configuration for windows vista or any known issue because when using IE Developer Toolbar I am able to find the link q on the page On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote: Bret, My script is going to the google URL, but for some reason it cannot find the text box. I have tried all the examples but I get the following output: broswer.url browser.text
[wtr-general] Re: Really....Ruby + Watir + Command Line
When I type the commans into IRB here is was I get as output: irb(main):001:0 require 'Watir' = true irb(main):002:0 test_site='www.google.com' = www.google.com irb(main):003:0 IE=Watir::IE.new = #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08, @pause_af ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE: 0x3e09a40 ..., @a ctiveObjectHighLightColor=yellow, @ole_object=nil, @rexmlDomobject=nil, @logge r=#Watir::DefaultLogger:0x3e033e8 @level=2, @formatter=#Logger::SimpleFormatte r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S, @default_formatter=#Logger:: Formatter:0x3e03334 @datetime_format=nil, @progname=nil, @logdev=#Logger::LogD evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280 @mon_enteri ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[], @dev=#IO:0x3 866ad4, @shift_size=nil, @shift_age=nil, @filename=nil, @down_load_time=0.515 , @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460 irb(main):004:0 IE.goto(test_site) = 0.234 irb(main):005:0 IE.text_field(:name,q).set(watir) Watir::Exception::UnknownObjectException: Unable to locate element, using :name, q from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284 :in `enabled?' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56: in `assert_enabled' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from (irb):5 But in my previous post I executed the script..which failed then logged into IRB and it was at google. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Really....Ruby + Watir + Command Line
Here is an output from IRB when I try to execute script line by line: irb(main):001:0 require 'Watir' = true irb(main):002:0 test_site='www.google.com' = www.google.com irb(main):003:0 IE=Watir::IE.new = #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08, @pause_af ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE: 0x3e09a40 ..., @a ctiveObjectHighLightColor=yellow, @ole_object=nil, @rexmlDomobject=nil, @logge r=#Watir::DefaultLogger:0x3e033e8 @level=2, @formatter=#Logger::SimpleFormatte r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S, @default_formatter=#Logger:: Formatter:0x3e03334 @datetime_format=nil, @progname=nil, @logdev=#Logger::LogD evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280 @mon_enteri ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[], @dev=#IO:0x3 866ad4, @shift_size=nil, @shift_age=nil, @filename=nil, @down_load_time=0.515 , @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460 irb(main):004:0 IE.goto(test_site) = 0.234 irb(main):005:0 IE.text_field(:name,q).set(watir) Watir::Exception::UnknownObjectException: Unable to locate element, using :name, q from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284 :in `enabled?' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56: in `assert_enabled' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from (irb):5 On Nov 12, 12:47 pm, tester86 sagar.am...@gmail.com wrote: Thanks for you input Tiffany but when I run the script and execute in IRB I get the following error message: NameError: undefined local variable or method `ie' for main:Object Is there something I have to set to intialize IE? On what operating system did you execute the script since I have several installs of ruby and watir and nothing is working for me. When I execute the script it opens a new window, on that window nothing happens, then it goes to my other window and loads up google and throw the error message unable to find q then in IRB it shows me this message. Do you have any idea on what is happening as I have been through all the basic examples but none of my scripts are working, even though they are very low level. When I try to do ie.text_contains(valueX) if throws me back an error stating undefined method for contains. Am I missing something in my set up or is it because of vista OS? Thanks On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote: The error message is saying that it can't find the text field with the name 'q'. For some reason, it doesn't exist in the browser contained by your variable ie. Are you sure that your browser is on the page you think it is? One way to troubleshoot this is with an irb session. Run your test and when it fails, open an irb session in a command prompt. Then try the following commands: require 'watir' ie = Watir::IE.find(:title, /Google/) ie.text_field(:name,'q').exists? I've copied both of your scripts into an irb session and they ran without any problems - even without the sleep commands (you shouldn't need those). Try stepping through your scripts, line by line in irb so you can watch what happens in with each step. Hope this helps, -Tiffany On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote: Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I
[wtr-general] Re: Watir Help
can i too have the detective number as I am also facing the problem of missing 'a' I have latest versions of watir and cucumber Any suggestions thanx in advance ravi On Thu, Nov 12, 2009 at 9:15 AM, tester86 sagar.am...@gmail.com wrote: hahahahahhaha very funny, hire a private dectivtive,...I know that the letter 'a' was missing before but after several reinstalls of ruby I did not bother to apply the fix to put the letter 'a' back onbut thanks for the comment. On Nov 9, 3:15 pm, Ethan notet...@gmail.com wrote: Somebody seems to be stealing all of your letters 'a'. Watir needs these, otherwise it's just 'wtir', and lacking the 'application' part can't do anything. I suggest you hire a privte detective to track down where all of your 'a's are disappearing to. The police are no help with this sort of thing - they have no 'a' in their name, and don't care. On Mon, Nov 9, 2009 at 15:29, tester86 sagar.am...@gmail.com wrote: Using cucumber and watir - Vista and Windows 7 Get the following error message: Unble to locte element, using :nme, q (Wtir::Exception::UnknownObjectException) ./fetures/step_definitions/serch_steps.rb:11:in `/I serch for (.*)/'fetures/serch.feture:8:in `When I serch for cucumber github' Then I should see BDD tht tlks to domin experts first nd code second # fet ures/step_definitions/serch_steps.rb:15 Anyone have any basic watir scripts that I can use with cucumber- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] RE: install for 1.6.2 doesn't work after 1.6.5 release
Should have said... ..it seems that there is an unnecessary gem dependency in the firewatir 1.6.2 install for commonwatir 1.6.5 (or maybe it's just for the latest version). -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Alan Baird Sent: Thursday, November 12, 2009 11:59 AM To: watir-general@googlegroups.com Subject: [wtr-general] install for 1.6.2 doesn't work after 1.6.5 release This morning I was helping a coworker get some things up and running with watir and noticed that he had inadvertently got 1.6.5. Since 1.6.5 changes the way .visible? works, we decided to go back to 1.6.2 and make sure everything was ok there. We removed watir, commonwatir and firewatir and verified that everything was uninstalled. After that, we did the following: C:\ gem install watir -v 1.6.2 ERROR: Error installing watir: firewatir requires commonwatir (= 1.6.5, runtime) C:\ gem list --local *** LOCAL GEMS *** (removed unnecessary gems) ... commonwatir (1.6.2) ... C:\ gem install firewatir -v 1.6.2 Successfully installed firewatir-1.6.2 1 gem installed Installing ri documentation for firewatir-1.6.2... Installing RDoc documentation for firewatir-1.6.2... C:\ gem install watir -v 1.6.2 Successfully installed watir-1.6.2 1 gem installed Installing ri documentation for watir-1.6.2... Installing RDoc documentation for watir-1.6.2... So, to me it seems that there is a gem dependency in the firewatir install for commonwatir 1.6.5 (or maybe it's just the latest version). What do you think? Alan This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] discussion and bugs
I'm going to address jarib's gist at http://gist.github.com/207724 for the stuff under 'discussion', I discuss inline (and generally say the route I took in my fork of watir); for the bugs, I mostly just say whether they are fixed in my fork. Discussion - [bug guard WTR-346] Should Image#{width,height,file_size} return String or Integer? Integer. mine does this. - [bug guard WTR-347] {Button,Image}#src returns full path in IE, actual attribute in Celerity - add deviation guard? (This also affects the Image#file_created_date spec) tricky, I think IE and firefox behave differently there too. - [deviation guard] Element#style returns actual style string on Celerity, calculated style in IE I think it should return the object, so that you can do element.style.backgroundColor and the like. - [bug guard WTR-348] Browser#status does not return the value of window.status yeah, we should probably make #status return this; make some other method return @ie.statusText. - [bug guard WTR-350] Element#to_s includes tag name in Celerity, not in Watir. Perhaps these should be changed anyway? Should include tag name. mine does. - [bug guard WTR-351] Element.new raises ArgumentError with wrong message fixed in mine; all Elements use the same initialize method. though it takes 3 arguments, one optional. - [deviation guard] Div#text should return an empty string if the div is hidden. Or should it? I can't see why it should. if I want the text, I use #text regardless of visibility; if I want to know if it's visible I use #visible?. If I want to know what text is visible, I'd use both methods. If I want to know what text exists even if it's not visible, this would take away that capability. The two aren't related and #text shouldn't be affected. Maybe a new method, #visible_text ? Somewhat tangentially, #visible? seems to return false if a thing is disabled - from #visible? (in Element class for IE-watir) if object.invoke('isDisabled') return false end This seems wrong to me. Disabled is different than visible; disabled elements are still visible (well, except when they aren't). - Container#option should be available from top level (Browser) or not? Yes. It is in mine. - Container#cells,rows should only be available on Table elements? Yes. Mine has: - Table#cells - returns cells of this table (not in any nested tables) - Table#rows - returns rows of this table (not in any nested tables) - TableRow#cells - cells of this row (not in any nested tables) - Container#table_cells - any td or th element (if called on a Table, this does go into nested ones) - Container#table_rows - any tr element (if called on a Table, this does go into nested ones) Watir bugs - [bug guard WTR-343] Browser#element_by_xpath not returning Watir objects I changed this to #element_object_by_xpath in mine, as it returns an ole object or jssh object. Element objects are returned by container methods, for example container.div(:xpath, whatever') - [bug guard WTR-344] Browser#elements_by_xpath doesn't support wildcard xpaths Yeah, I started looking for a more thorough xpath implementation briefly, but stopped because my application doesn't really use xpath. - [bug guard WTR-327] Browser#element_by_xpath should return a Watir::Element if there are no matching elements, not nil container.div(:xpath, 'whatever') does this. Mine doesn't have an #element_by_xpath anymore, so doesn't really apply. - [bug guard WTR-328] Browser#elements_by_xpath should return an empty Array if there are no matching elements Maybe we should come up with a better standard for specifying by xpath. for single elements, container methods with how=:xpath is good and consistent, I think, but for collections, I don't have a solution currently. My watir usage doesn't really use xpath at the moment, so haven't done much with this. - [bug guard WTR-349] Buttons#length is missing two buttons this should work in mine - [bug guard WTR-349] Buttons#last fails this should work in mine - [bug guard WTR-355] Form should accept 'class' as how argument works in mine - [bug guard WTR-356] Form#exists? should raise TypeError on invalid 'what' argument. shouldn't this raise MissingWayOfFindingException on #initialize if 'what' is invalid? thus not be instantiated with invalid 'what' - [bug guard WTR-352] Element#parent should return the correct Watir object type if possible. works in mine - [bug guaard WTR-353] TextField#visible? should return false if type='hidden' works in mine - [bug guard WTR-354]TableRow#length,Table#row_count, TableRows#lengthshould return the correct number of cells TableRow#length isn't defined in mine, though I don't think that's a good method name. table_row.cell_count is good (and is defined in mine - I think it is in Watir too), but #length seems
[wtr-general] Re: Really....Ruby + Watir + Command Line
Are you running your command prompt session with administrator privileges? I had a problem when I moved to Vista where two browsers were being opened. Try the suggestions Bill Agee gave me: http://tinyurl.com/ygn4fpx Hope this helps! -Tiffany On Nov 12, 11:47 am, tester86 sagar.am...@gmail.com wrote: Thanks for you input Tiffany but when I run the script and execute in IRB I get the following error message: NameError: undefined local variable or method `ie' for main:Object Is there something I have to set to intialize IE? On what operating system did you execute the script since I have several installs of ruby and watir and nothing is working for me. When I execute the script it opens a new window, on that window nothing happens, then it goes to my other window and loads up google and throw the error message unable to find q then in IRB it shows me this message. Do you have any idea on what is happening as I have been through all the basic examples but none of my scripts are working, even though they are very low level. When I try to do ie.text_contains(valueX) if throws me back an error stating undefined method for contains. Am I missing something in my set up or is it because of vista OS? Thanks On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote: The error message is saying that it can't find the text field with the name 'q'. For some reason, it doesn't exist in the browser contained by your variable ie. Are you sure that your browser is on the page you think it is? One way to troubleshoot this is with an irb session. Run your test and when it fails, open an irb session in a command prompt. Then try the following commands: require 'watir' ie = Watir::IE.find(:title, /Google/) ie.text_field(:name,'q').exists? I've copied both of your scripts into an irb session and they ran without any problems - even without the sleep commands (you shouldn't need those). Try stepping through your scripts, line by line in irb so you can watch what happens in with each step. Hope this helps, -Tiffany On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote: Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I execute the script I get the error mentioned above. Thanks On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Please try to use slep(10) commands. It means ie.goto(htp://google.com) sleep(10) ie.text_field(:name,q).set(Raveendran) sleep(10) . . . I hope it works now. Rit ? On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote: Another Error From Command Prompt: ## Beginning of test: Google search Step 1: go to the test site:http://www.google.com Action: enteredhttp://www.google.comintheaddressbar. Action: WaitForPageToLoad c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements.rb:323:in `set' from script1.rb:28 I never had any problems when I was using watir on windows xp, I am not 100% sure but is there any
[wtr-general] Re: Really....Ruby + Watir + Command Line
Thanks for your help! It turn out that Bill's helped actually helped me out. I have to run command prompt as administrator. My script is now running finally after two days of debugging watir. Thanks for all your help! On Nov 12, 1:55 pm, Tiffany Fodor tcfo...@comcast.net wrote: Are you running your command prompt session with administrator privileges? I had a problem when I moved to Vista where two browsers were being opened. Try the suggestions Bill Agee gave me: http://tinyurl.com/ygn4fpx Hope this helps! -Tiffany On Nov 12, 11:47 am, tester86 sagar.am...@gmail.com wrote: Thanks for you input Tiffany but when I run the script and execute in IRB I get the following error message: NameError: undefined local variable or method `ie' for main:Object Is there something I have to set to intialize IE? On what operating system did you execute the script since I have several installs of ruby and watir and nothing is working for me. When I execute the script it opens a new window, on that window nothing happens, then it goes to my other window and loads up google and throw the error message unable to find q then in IRB it shows me this message. Do you have any idea on what is happening as I have been through all the basic examples but none of my scripts are working, even though they are very low level. When I try to do ie.text_contains(valueX) if throws me back an error stating undefined method for contains. Am I missing something in my set up or is it because of vista OS? Thanks On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote: The error message is saying that it can't find the text field with the name 'q'. For some reason, it doesn't exist in the browser contained by your variable ie. Are you sure that your browser is on the page you think it is? One way to troubleshoot this is with an irb session. Run your test and when it fails, open an irb session in a command prompt. Then try the following commands: require 'watir' ie = Watir::IE.find(:title, /Google/) ie.text_field(:name,'q').exists? I've copied both of your scripts into an irb session and they ran without any problems - even without the sleep commands (you shouldn't need those). Try stepping through your scripts, line by line in irb so you can watch what happens in with each step. Hope this helps, -Tiffany On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote: Hi, When I try run any script I still get the following error message: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_ex ists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:323:in `set' from script2.rb:6 Here is my script: require 'watir' ie = Watir::IE.new ie.goto(http://www.google.com;) sleep(10) ie.text_field(:name,q).set(watir) sleep(10) Here is my other scripts: #require 'rubygems' require 'watir' # set a variable test_site = 'http://www.google.com' # open the IE browser ie = Watir::IE.new puts Step 1: go to the test site: + test_site ie.goto(test_site) puts Action: entered + test_site + in the address bar. puts Action: WaitForPageToLoad sleep(10) #puts Click on the Gmail Link #ie.link(id, '').click #puts Action: Enter InfoQ into text box ie.text_field(:name,q).set(watir) sleep(10) #puts Action: Click Search Button #ie.button(:name, btnG).click As far as I know my script should be fine as I am following the watir commans correctly but everytime I execute the script I get the error mentioned above. Thanks On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Please try to use slep(10) commands. It means ie.goto(htp://google.com) sleep(10) ie.text_field(:name,q).set(Raveendran) sleep(10) . . . I hope it works now. Rit ? On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote: Another Error From Command Prompt: ## Beginning of test: Google search Step 1: go to the test site:http://www.google.com Action: enteredhttp://www.google.comintheaddressbar. Action: WaitForPageToLoad c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObje ctException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
[wtr-general] Re: run firewatir from terminal
I'm assuming you're on OSX from the Terminal reference, which would have been a useful thing for you to mention. The way you're running it, bash is going to try to execute your ruby script as a bash script, I expect, rather than ruby. You have a couple of options: Simplest is, you can run `ruby path/to/script.rb` and not have to change the executable permission or anything else. Or, you can add a #! statement to the beginning of the file, such as #!/path/to/your/ruby or, more generally useful: #!/usr/bin/env ruby see https://secure.wikimedia.org/wikipedia/en/wiki/Shebang_(Unix) for more info on that. On Thu, Nov 12, 2009 at 16:37, Shlomit Gazit shlomitpatr...@gmail.comwrote: In watir windows I can simply type in command line the name of the rb file and it will open IE and run watir test. How can I do it with firewatir? I was trying to do it from Terminal (with ./) but in the beginning it didnt do anything, then I changed permission to rb file to be executable, then it let me run the rb file but it complains about: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ Any idea? Shlomit. --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Example of assertions
Ah - I didn't realize this, but you need to require it: require 'watir/contrib/visible' -Tiffany On Nov 12, 3:08 pm, QAguy qablogm...@gmail.com wrote: I try something like this: @browser.text.visible?(Preparing to Optimize).should == false but I get: undefined method `visible?' for #String:0x1032d3ad0 I'm working with Safariwatir. Thanks QAguy On Nov 12, 4:22 pm, Tiffany Fodor tcfo...@comcast.net wrote: Oops, sorry - to see if text is visible, use: ie.text('My Text').visible? On Nov 12, 2:09 pm, QAguy qablogm...@gmail.com wrote: Does anyone have examples of assertions. For example how would I assert that text on a page in either visible or invisible. Thanks --~--~-~--~~~---~--~~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---