Re: [wtr-general] Re: Watir Webdriver Performance Error
Yeah I agree RE non-hash return objects... I'l fire up a windows VM this weekend and see if I can pinpoint what's being returned ... stay tuned =) Cheers, Tim On Fri, Dec 9, 2011 at 10:45 AM, Jari Bakken jari.bak...@gmail.com wrote: On Thu, Dec 8, 2011 at 3:36 AM, @90kts tim.ko...@gmail.com wrote: Well it appears from the OP error that the return object of Browser#execute_script is a WebDriver::Element.. hence my code is failing as it expects a hash. I'm not sure why this is doing it on Win2K8 R2 with IE9, as I don't have that development platform... but it was tested on Win2K3 with IE9 as Chuck mentioned. I could just raise an error like Jari suggested, but that won't help the outcome (getting navigation timings). We *could* just monkey patch the execute_script method, but before I do, Jari, is there a more elegant solution? module Watir class Browser def execute_script(script, *args) args.map! { |e| e.kind_of?(Watir::Element) ? e.wd : e } obj = @driver.execute_script(script, *args) obj.each { |k,v| obj[k] = wrap_elements_in(v) } obj end end end Well, execute_script should already wrap instances of Selenium::WebDriver::Element in Watir::Element, so I'm not sure how that is happening. https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/browser.rb#L122 I don't really see how the monkey patch would help (e.g. it would break any script that doesn't return a Hash). Someone needs to get their hands on a Windows box in order to solve this I think :) -- 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
Re: [wtr-general] Is Firewatir Dead?
personally I prefer watir-webdriver ... Regards -- Tim Koopmans On Thursday, 23 June 2011 at 7:22 AM, Michael wrote: From a bit of web research it doesn't look like there is going to be a version of jssh for Firefox 4... Does that mean Firewatir is dead? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com (mailto:watir-general@googlegroups.com) http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com (mailto: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
Re: [wtr-general] Re: Watir Grid Examples Help
I think an easier way would be to parallelize 'outside' the cucumber script ... Here is what I have: So I have two feature files each with 2 scenarios I have 2 step_definition files and an env.rb My env.rb file looks something like this: $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib')) require 'watirgrid' require 'rspec/expectations'; ENV[GRID] = 'true' ENV[controller_uri] = druby://10.194.192.181:11235 Start the controller manually outside the cucumber scenario, you could just do this via a dos script e.g. controller controller = Controller.new( :loglevel = Logger::ERROR) controller.start so get rid of the above, no need to start a controller within the scenario In this case just start 1 provider when the cucumber script runs provider = Provider.new( :loglevel = Logger::ERROR, :driver = 'webdriver') provider.start if ENV[GRID] then params = {} params[:controller] = controller params[:browser_type] = 'firefox' grid ||= Watir::Grid.new(params) just take 1 provider, because at the time, there will only be 1 available on the grid grid.start(:initiate = true, :quantity = *1*, :take_all = true) else @browser ||= Watir::Browser.new :firefox end Before do |scenario| @grid = grid @browser = grid.providers.first end at_exit do grid.iterate do |browser| browser.close end grid.release_tuples end So to run in 'parallel' in a hacky way (just to get things going) in 3 dos shells run the following controller cucumber feature1.feature cucumber feature2.feature I'm having a holiday shortly and will think about better ways to parallelize within cucumber... -- 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] Watir Grid Examples Help
Hi Usman, I can probably help you =) The correct order to start up a grid is: 1. start the controller on a central machine e.g. controller when it starts up it will tell you what its URI is. This is what you'll use to connect other providers e.g. I, [2011-06-04 08:22:15 #99844] INFO -- : Controller started on : *druby:// 10.0.1.158:11235* 2. Now on the remote machines, start up the providers e.g. provider -d webdriver -c *druby://10.0.1.158:11235* Note I need to specify a driver (-d) and the controller's URI (-c). You should see something like this in the console. I, [2011-06-04 08:25:37 #3069] INFO -- : Provider started on : druby:// 10.0.1.158:11236 I, [2011-06-04 08:25:37 #3069] INFO -- : Controller found on : druby:// 10.0.1.158:11235 I, [2011-06-04 08:25:37 #3069] INFO -- : Provider registered : druby:// 10.0.1.158:11235 Are you trying to run 2 browsers on one machine, or 2 browsers on 2 remote machines? If you are starting multiple providers on the same machine then we will need to separate their DRb servers which I can help you with ... Cheers, Tim @90kts On Fri, Jun 3, 2011 at 2:40 PM, Usman Hussain usmanhhuss...@gmail.comwrote: Hi Guys, I wanted to get my tests to run parallel to one another so I went to GitHub/WatirGrid and downloaded the whole project. I then began to run the examples. I was able to one tests running in two different browsers (firefox and chrome). So then I thought let me run the parallel test provided. But when I do I get the following error: druby://10.0.1.3:11235 - #Errno::ECONNREFUSED: Connection refused - connect(2) (DRb::DRbConnError) I then went to Terminal and typed in 'controller' and got the following: I, [2011-06-03 15:31:40 #67916] INFO -- : Controller started on : druby://10.194.192.181:11235 So I changed the controller uri to druby://10.194.192.181:11235 and then i got the following error: druby://10.194.192.181:11235 - #Errno::ECONNREFUSED: Connection refused - connect(2) (DRb::DRbConnError) Has anyone else had any trouble running the examples in watirgrid... or come across this error message? Kind regards, Usman Hussain -- 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
Re: [wtr-general] Watir Grid Examples Help
Hi Usman, If you follow the cucumber example you can indeed run 2 or more instances of a webdriver browser on one machine. Line 13 in env.rb should be changed to n.times where n is the desired number of browsers ... But beware that running multiple browsers on a single core (machine) is not ideal in terms of performance. You'll probably find browser performance will degrade after 5 or so parallel browsers. YMMV. And yes you can start and stop a controller/providers programatically rather than a command line. There's plenty of examples in the git repo (as well as its spec test cases) which do this... The next question you'll probably ask is how can you then divide the cucumber scenarios up between the different browsers so the entire suite can be processed more quickly. As in run different scenarios at the same time. Have a look at the discussion here: http://stackoverflow.com/questions/5903379/parallel-cucumber-watir-scenarios-in-windows Cheers, Tim @90kts On Sat, Jun 4, 2011 at 11:27 AM, usmanhhuss...@gmail.com wrote: Hi tim, Thanks for your advice. I will be trying to run everything on one machine. Also a side question which is prob really stupid, but in your examples on github, do the env.) Files in the cucumber section not start the providers and controllers. I am using cucumber with watir webdriver. I managed to get 1 test running on 2 browsers. But I was more interested in the parallel tests. So getting 2 feature files running in parallel to one another. I really do appreciate your help. Kind regards, Usman -- -- *From: * Tim Koopmans tim.ko...@gmail.com *Sender: * watir-general@googlegroups.com *Date: *Fri, 3 Jun 2011 22:27:13 + *To: *watir-general@googlegroups.com *ReplyTo: * watir-general@googlegroups.com *Subject: *Re: [wtr-general] Watir Grid Examples Help Hi Usman, I can probably help you =) The correct order to start up a grid is: 1. start the controller on a central machine e.g. controller when it starts up it will tell you what its URI is. This is what you'll use to connect other providers e.g. I, [2011-06-04 08:22:15 #99844] INFO -- : Controller started on : * druby://10.0.1.158:11235* 2. Now on the remote machines, start up the providers e.g. provider -d webdriver -c *druby://10.0.1.158:11235* Note I need to specify a driver (-d) and the controller's URI (-c). You should see something like this in the console. I, [2011-06-04 08:25:37 #3069] INFO -- : Provider started on : druby:// 10.0.1.158:11236 I, [2011-06-04 08:25:37 #3069] INFO -- : Controller found on : druby:// 10.0.1.158:11235 I, [2011-06-04 08:25:37 #3069] INFO -- : Provider registered : druby:// 10.0.1.158:11235 Are you trying to run 2 browsers on one machine, or 2 browsers on 2 remote machines? If you are starting multiple providers on the same machine then we will need to separate their DRb servers which I can help you with ... Cheers, Tim @90kts On Fri, Jun 3, 2011 at 2:40 PM, Usman Hussain usmanhhuss...@gmail.comwrote: Hi Guys, I wanted to get my tests to run parallel to one another so I went to GitHub/WatirGrid and downloaded the whole project. I then began to run the examples. I was able to one tests running in two different browsers (firefox and chrome). So then I thought let me run the parallel test provided. But when I do I get the following error: druby://10.0.1.3:11235 - #Errno::ECONNREFUSED: Connection refused - connect(2) (DRb::DRbConnError) I then went to Terminal and typed in 'controller' and got the following: I, [2011-06-03 15:31:40 #67916] INFO -- : Controller started on : druby://10.194.192.181:11235 So I changed the controller uri to druby://10.194.192.181:11235 and then i got the following error: druby://10.194.192.181:11235 - #Errno::ECONNREFUSED: Connection refused - connect(2) (DRb::DRbConnError) Has anyone else had any trouble running the examples in watirgrid... or come across this error message? Kind regards, Usman Hussain -- 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.comhttp://groups.google.com/group/watir-generalwatir-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 -- 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
Re: [wtr-general] Re: type-ahead select lists
Hi Lisa, what's the code for selectPlanAdvisor(); Do? Might be worth just eval'ing that ... Regards, Tim Sent from my mobile ... On 28/05/2011, at 6:05 AM, Lisa Crispin lisa.cris...@gmail.com wrote: (re-sending, I don't think it got sent for some reason) Now I am able to type text into the hidden field, but after looking at the links Chuck recommended, the code from Paul, and lots of other Googling around, I'm still flummoxed on trying to get the event to fire. Here is the html: select dojoType=dijit.form.FilteringSelect id='advisorId' name='advisorId' onchange=javascript:selectPlanAdvisor(); option value=0 selected No Advisor /option option value=3785 FERNANDEZ, KEVIN S /option /select Here is what I've tried to try to fire the event: ie.hidden(:id, 'advisorId').fire_event(onchange) This returns a value of yellow in irb (WTF?) but does not fire the JS. One of the Java developers here tried to help, but he's as baffled as I am. Any other suggestions? I will have many scripts broken because of this, and I depend on those scripts to help with our exploratory testing as well as testing releases to the staging environment. I don't want to lose them! thanks, Lisa On Thu, May 26, 2011 at 1:44 AM, Chuck van der Linden sqa...@gmail.com wrote: I'd wager it's working off keypress events. Problem is we can't easily fire those in watir because the .fire_event method only takes a single parameter (the event) and I believe to work properly keypress needs a parameter for the value of the key that was depressed. You might need to write your own function that executes the javascript fireevent function instead, similar to this item from Stackoverflow a year or two ago http://stackoverflow.com/questions/602069/autocomplete-dropdown-test-with-ruby-watir Another alternative is described here http://zbarzone.blogspot.com/2008/08/watir-sendkeys-and-javascript.html and that approach might actually be better for you. To fix this 'for real' it seems we'd need to first modify .fire_event to allow for a second parameter, or create a new method such as .fire_key_event that would take two parameters. Then any other methods that have keypress events in them such as .set would need to be altered to fire the down/press/up events character by character and fire those events with the proper 'key' values for each character. On May 24, 11:24 am, Lisa Crispin lisa.cris...@gmail.com wrote: I tried the log events thing, it's nice to know about that, but I don't see anything that really looks like the JS firing. I see a lot of 'select', 'click' 'keydown', 'input', 'keypress', 'keyup', none of that looks like what the JS is doing with the type ahead. -- LIsa On Mon, May 23, 2011 at 2:36 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, May 23, 2011 at 9:44 PM, Lisa Crispin lisa.cris...@gmail.com wrote: We are changing what used to be regular drop-down select list boxes to a dojo widget thingie that allows type ahead to select the item. Is the page public? Or a similar page? Frameworks usually have examples somewhere online. If you think the only problem is that a JavaScript event is not fired (by Watir), take a look at this: http://stackoverflow.com/questions/3787555/how-to-find-out-which-java... If the site is not public, but you could show it to me, contact me off list. Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host viaqa.mobi conference on software testing - organizer -- 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.com -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com @lisacrispin on Twitterhttp://entaggle.com/lisacrispin -- 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 -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com @lisacrispin on Twitter http://entaggle.com/lisacrispin -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com
Re: [wtr-general] Watir for Chrome(Shut down issue)
If Jari is asleep since it's 2am in Oslo, the remote url syntax is the url of the remote webdriver server e.g. Watir::Browser.new(:remote, :url = 'http://localhost:') NOT the url of the system under test .. So point it to whatever URL the chrome driver has started up and is listening on I assume it is: (:remote, :url = http://localhost:9515;) Cheers, Tim @90kts On Wed, May 18, 2011 at 10:26 AM, Ashok Tulachan tulachanas...@gmail.comwrote: Thanks you very much again for your reply Jari. What i was saying was that when i ran from the SCITE program, it shuts down automatically after completion of the script but when i run from the irb, it stops where i ran the last command since it does line by line. Now back to the chrome problem, When i tried to run like you said, it's giving me different error. Below are the steps that i did. 1.I ran the chromedriver.exe which was in the /Ruby/bin folder. 2. I ran the ruby script which is: *require 'rubygems'* *require 'watir-webdriver'* ** *$b=Watir::Browser.new(:remote, **www.google.com* http://www.google.com/ *)* ** ** *$b.text_field(:name, 'username').set ash* *$b.text_field(:name, 'password').set tulachan* ** Now when i run like that, it's giving me error as below. *C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/common.rb:66:in `create_response': unexpected response, code=404, content-type=text/html (Selenium::WebDriver::Error::WebDriverError) htmlheadtitleApache Tomcat/5.5.20 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 404 - /portal/session/h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b u/portal/session/u/ppbdescription/b uThe requested resource (/portal/session) is not available./u/pHR size=1 noshade=noshadeh3Apache Tomcat/5.5.20/h3/body/html from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/default.rb:56:in `request' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:476:in `raw_execute' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:88:in `create_session' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/common/driver.rb:29:in `new' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/common/driver.rb:29:in `for' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver.rb:74:in `for' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.2.3/lib/watir-webdriver/browser.rb:35:in `initialize' from watirlocal.rb:6:in `new' from watirlocal.rb:6:in `main' * On Tue, May 17, 2011 at 5:52 PM, Jari Bakken jari.bak...@gmail.comwrote: On Tue, May 17, 2011 at 6:00 PM, Ashok Tulachan tulachanas...@gmail.com wrote: The weird thing is that it shuts down even after completion while it stays in the same page for IE. However when i copy the same code and run in IRB, it doesn't shut down. It's not weird at all, it's intentional behaviour on our side since we can't currently shut down the server (the chromedriver.exe you downloaded) without shutting down all Chrome instances. The IE driver doesn't have the same problem, as it's able to detach from the IE process on shutdown. Until we have fixed this, one option to work around this is by managing the server process yourself, i.e. keep it running after your Ruby processes die: 1. Launch chromedriver.exe manually 2. Run scripts using the remote driver: Watir::Browser.new(:remote, :url = http://localhost:9515;) 3. Shut down chromedriver.exe manually I'm surprised if you're able to exit IRB and leave any Chrome instances running. That sounds like IRB isn't doing proper cleanup (i.e. not calling at_exit hooks). -- 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] Watir with Telerik Rad Grid
Please supply some examples of: 1. The html you are working with (or even a URL so we can all see it) 2. The watir code you are trying to execute 3. ruby version / watir version / operating system and browser version ... On Sat, Apr 30, 2011 at 1:35 PM, ranjith kumar ranjith@gmail.comwrote: Hello, I am working with teleric rad grid control. I have select any rown in the grid window using watir. COuld you please help me in resolving this, Thanks in advance Regards, Ranjith -- 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 -- Cheers, Tim @90kts -- 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] Communicating Watir-Results
Consider some form of CI like judson/jenkings perhaps? Put your scripts into a test framework that has reporting/test runners like rspec or cucumber? I use the Pony gem on linux for just about all my mailing needs ... On Thu, Apr 28, 2011 at 6:17 AM, Francisco Diaz Trepat - gmail francisco.diaztre...@gmail.com wrote: Hi guys I was planning to use net/smtp for communicating watir results. I need some guidance/recommendations for it. Is this ok? should I use something else? How could I send the stdout lines of text that are written when watir runs and fails or I do a puts? In other words, how would you notify on test faillures? f(t) -- 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 -- Cheers, Tim @90kts -- 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] Automate Flash and fusion charts?
NOt really =) Try Sikuli http://www.software-testing.com.au/blog/2010/08/16/automating-flash-ajax-popups-and-more-using-ruby-watir-and-sikuli/ You can use it with Watir (on Jruby)... On Wed, Apr 20, 2011 at 5:01 PM, vin vinay...@gmail.com wrote: Hi, Can we use Watir tool to automate flash and fusion charts (get the colour of the chart, values etc)? Is there any alternative if answer is NO? Thanks, Vin -- 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 -- Cheers, Tim @90kts -- 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] Released WatirSplash 1.2.0
+1 On Mon, Apr 18, 2011 at 3:56 PM, Ekin Han nbkhic...@gmail.com wrote: It is great. Could you send out some samples about how to use it? 2011/4/18 Tim Koopmans tim.ko...@gmail.com Looks great Jarmo, am keen to give it a try. Will let you know how it goes. Cheers, Tim @90kts On Sun, Apr 17, 2011 at 7:47 AM, Jarmo jarm...@gmail.com wrote: Hello! I've just released the WatirSplash 1.2.0 gem. WatirSplash makes browser-based web page testing in Ruby splashin' easy. It combines Watir (http://www.watir.com) for controlling the browser and RSpec (http://relishapp.com/rspec) for testing framework. This powerful combination gives you the ability to write easily well-maintained and easy-to-read specs (specifications in RSpec) so you don't need to have any extra documentation for your applications. WatirSplash makes it easier to use best features of both of these tools together so you won't have to spend time on thinking how to do that yourself - you can start testing right away! The most interesting new feature is the #in RSpec matcher, which allows to write your tests in even better way. Check out the wiki link below. Changelog: * fixed Watir::Browser#attach for Watir::IE * added #in(timeout) method for all RSpec matchers (read more about it on the wiki https://github.com/jarmo/WatirSplash/wiki/RSpec-Features) * added #make as an alias for #change as a RSpec matcher * bump watir/firewatir dependency to 1.8.1 * bump watir-webdriver dependency to 0.2.2 * bump win32screenshot dependency to 1.0.3 Install it with: gem install watirsplash Source code is located at GitHub https://github.com/jarmo/watirsplash Jarmo Pertman - IT does really matter - http://www.itreallymatters.net -- 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 -- Cheers, Tim @90kts -- 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] Released WatirSplash 1.2.0
Looks great Jarmo, am keen to give it a try. Will let you know how it goes. Cheers, Tim @90kts On Sun, Apr 17, 2011 at 7:47 AM, Jarmo jarm...@gmail.com wrote: Hello! I've just released the WatirSplash 1.2.0 gem. WatirSplash makes browser-based web page testing in Ruby splashin' easy. It combines Watir (http://www.watir.com) for controlling the browser and RSpec (http://relishapp.com/rspec) for testing framework. This powerful combination gives you the ability to write easily well-maintained and easy-to-read specs (specifications in RSpec) so you don't need to have any extra documentation for your applications. WatirSplash makes it easier to use best features of both of these tools together so you won't have to spend time on thinking how to do that yourself - you can start testing right away! The most interesting new feature is the #in RSpec matcher, which allows to write your tests in even better way. Check out the wiki link below. Changelog: * fixed Watir::Browser#attach for Watir::IE * added #in(timeout) method for all RSpec matchers (read more about it on the wiki https://github.com/jarmo/WatirSplash/wiki/RSpec-Features) * added #make as an alias for #change as a RSpec matcher * bump watir/firewatir dependency to 1.8.1 * bump watir-webdriver dependency to 0.2.2 * bump win32screenshot dependency to 1.0.3 Install it with: gem install watirsplash Source code is located at GitHub https://github.com/jarmo/watirsplash Jarmo Pertman - IT does really matter - http://www.itreallymatters.net -- 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
Re: [wtr-general] How to 'click' row from table returned by AJAX-helper at google.com?
Click on the table row instead, and use the :index attribute e.g. browser.tr(:class = 'gac_a', :index= 2).click will click the third row of the auto suggestions ... Cheers, Tim @90kts On Sat, Apr 9, 2011 at 6:40 PM, Vitaliy Smok 4sm...@gmail.com wrote: Hi! I'm study using of Watir at Ruby. At main page ( www.google.com ) when you entering something AJAX-helper gives you 10 variants of search queries, and you can click at any of them to get immediately search results. That helper is just table and you can access its elements by browser.table(:class = 'gac_m')[X]. For example, text of element:: browser.table(:class = 'gac_m')[3].text = 1 \320\272\320\262\321\226\321\202\320\275\321\217 Here example how I'm doing now: require rubygems require watir-webdriver browser = Watir::Browser.new(:firefox) browser.goto(http://www.google.com;) browser.text_field(:name = q).set 1 browser.text_field(:name = q).set browser.table(:class = 'gac_m')[3].text browser.button(:name = btnG).click But I'm wondering how i can click it from Watir to simulate real user actions: irb(main):182:0 browser.table(:class = 'gac_m')[3].click = [] and nothing happens, so I'm doing something wrong, may you advice? system: Ruby1.87WindowsXPFireFox 4 -- 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
Re: [wtr-general] Managing multiple version of Watir
Rvm ? Regards, Tim Sent from my mobile ... On 31/03/2011, at 12:39 AM, Darryl Brown d-l-br...@roadrunner.com wrote: Hello All, We are currently using Git branches to manage multiple versions of Watir. Our base scripts were all created with 1.6.2 and we're transitioning to the newer versions and testing along the way. Start out with master branch that does that does not have Watir. Then from master, checkout -b 1.6.2; then 1.6.7, 1.7.0 etc. and install the versions. Now we can easily switch versions. My question - is there a different / better way to accomplish this? Thanks, Darryl -- 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
Re: [wtr-general] taza no longer works after upgrade to Ruby 1.8.7/ Watir 1.8.0
Looks like you still have another version of Ruby on your system at c:/ruby If you're re-installing or changing versions, make sure you get rid of references to old binaries in your %PATH% especially for ruby and gem executables. Also delete any old ruby directories / gemfiles in your application / document settings path that may have not been cleaned up by the uninstall. If reinstalling from scratch I recommend using ruby 1.8.7 with the latest version of Watir. Pity you'r not on osx or linux as I'd definitely recommend RVM when 'experimenting' with different ruby / gem versions =) Cheers, Tim @90kts On Wed, Mar 23, 2011 at 5:54 AM, hillary weimar1...@gmail.com wrote: So i've made a mess of my ruby/watir install. I was using taza with Ruby 1.8.6, Watir 1.6.7. and it worked. But then i was having trouble installing this configuration on a vm that i was setting up. Long story short I installed the latest version of watir/ruby on my local machine and its not working when i try to execute the taza commands to create a new site/pages/flows. I'd either like to be able to use the current installation or go back to the previous version that i had installed. For both of these options I'm running into problems. With the current configuration (Ruby 1.8.6/Watir 1.8.0), when I run this command: script\generate site insight I get the following error: C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original _require': no such file to load -- activesupport (LoadError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/taza-0.8.7/generators/ site/site_g enerator.rb:3 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/spec.rb :16:in `klass' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/lookup. rb:165:in `instance' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/scripts /../scripts.rb:32:in `run' from script/generate:14 Active support is installed, so I'm not sure what's happening. I've tried going to back to the previous version of Ruby/Watir but when i try to install any of the ruby gems I had I get an error message like this: Building native extensions. This could take a while... ERROR: Error installing rcov: ERROR: Failed to build gem native extenstion. c:/ruby/bin/ruby.exe creating Makefile nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/ rcov-0.8.1.2.0 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/ext/ rcovrt/gem_make.out System Information: Win7/32-bit RubyGems Environment: - RUBYGEMS VERSION: 1.6.2 - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] - INSTALLATION DIRECTORY: C:/Ruby187/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby187/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby187/bin - RUBYGEMS PLATFORMS: - ruby - x86-mingw32 - GEM PATHS: - C:/Ruby187/lib/ruby/gems/1.8 - C:/Users/hhueter.CORP/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: - http://rubygems.org/ Current gems installed: activesupport (3.0.5) builder (3.0.0) commonwatir (1.8.0) diff-lcs (1.1.2) firewatir (1.8.0) hoe (2.9.1) i18n (0.5.0) mocha (0.9.12) nokogiri (1.4.4.1 x86-mingw32) rake (0.8.7) rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-mocks (2.5.0) rubigen (1.5.6) rubygems-update (1.3.6) s4t-utils (1.0.4) taglob (1.1.2) taza (0.8.7) user-choices (1.1.6.1) watir (1.8.0) win32-api (1.4.8 x86-mingw32) win32-process (0.6.5) windows-api (0.4.0) windows-pr (1.1.3) xml-simple (1.0.14) -- 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
Re: [wtr-general] Re: taza no longer works after upgrade to Ruby 1.8.7/ Watir 1.8.0
Just delete the windows folders e.g. c:\ruby and cleanup any references in %PATH% environment variable ... Can't remember if there are also hidden folders for gemfiles in C:\documents and settings\username Sometimes that happens on networked PCs (i.e. in work setups) Cheers, Tim @90kts On Wed, Mar 23, 2011 at 8:48 AM, hillary weimar1...@gmail.com wrote: Okay. What's the best way to delete any references to ruby (either 1.8.6 or 1.8.7)? I'm going through the folder where I've installed everything. But I'm not sure the best way to make sure that everything is gone before trying to do a fresh install. On Mar 22, 12:44 pm, Tim Koopmans tim.ko...@gmail.com wrote: Looks like you still have another version of Ruby on your system at c:/ruby If you're re-installing or changing versions, make sure you get rid of references to old binaries in your %PATH% especially for ruby and gem executables. Also delete any old ruby directories / gemfiles in your application / document settings path that may have not been cleaned up by the uninstall. If reinstalling from scratch I recommend using ruby 1.8.7 with the latest version of Watir. Pity you'r not on osx or linux as I'd definitely recommend RVM when 'experimenting' with different ruby / gem versions =) Cheers, Tim @90kts On Wed, Mar 23, 2011 at 5:54 AM, hillary weimar1...@gmail.com wrote: So i've made a mess of my ruby/watir install. I was using taza with Ruby 1.8.6, Watir 1.6.7. and it worked. But then i was having trouble installing this configuration on a vm that i was setting up. Long story short I installed the latest version of watir/ruby on my local machine and its not working when i try to execute the taza commands to create a new site/pages/flows. I'd either like to be able to use the current installation or go back to the previous version that i had installed. For both of these options I'm running into problems. With the current configuration (Ruby 1.8.6/Watir 1.8.0), when I run this command: script\generate site insight I get the following error: C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original _require': no such file to load -- activesupport (LoadError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/taza-0.8.7/generators/ site/site_g enerator.rb:3 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:29:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/spec.rb :16:in `klass' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/lookup. rb:165:in `instance' from C:/Ruby187/lib/ruby/gems/1.8/gems/rubigen-1.5.6/lib/ rubigen/scripts /../scripts.rb:32:in `run' from script/generate:14 Active support is installed, so I'm not sure what's happening. I've tried going to back to the previous version of Ruby/Watir but when i try to install any of the ruby gems I had I get an error message like this: Building native extensions. This could take a while... ERROR: Error installing rcov: ERROR: Failed to build gem native extenstion. c:/ruby/bin/ruby.exe creating Makefile nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/ rcov-0.8.1.2.0 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/ext/ rcovrt/gem_make.out System Information: Win7/32-bit RubyGems Environment: - RUBYGEMS VERSION: 1.6.2 - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] - INSTALLATION DIRECTORY: C:/Ruby187/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby187/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby187/bin - RUBYGEMS PLATFORMS: - ruby - x86-mingw32 - GEM PATHS: - C:/Ruby187/lib/ruby/gems/1.8 - C:/Users/hhueter.CORP/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://rubygems.org/ Current gems installed: activesupport (3.0.5) builder (3.0.0) commonwatir (1.8.0) diff-lcs (1.1.2) firewatir (1.8.0) hoe (2.9.1) i18n (0.5.0) mocha (0.9.12) nokogiri (1.4.4.1 x86-mingw32) rake (0.8.7) rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-mocks (2.5.0) rubigen (1.5.6) rubygems-update (1.3.6) s4t-utils (1.0.4) taglob (1.1.2) taza (0.8.7) user-choices (1.1.6.1) watir (1.8.0) win32-api
Re: [wtr-general] Error on Watir installation
For the time being, install rubygems manually, I've been having similar trouble with firewatir and ubuntu http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.zip unzip rubygems-1.6.2.zip ruby rubygems-1.6.2/setup.rb Cheers, Tim @90kts On Tue, Mar 22, 2011 at 10:04 AM, blkjk blkjk@gmail.com wrote: on WIN7 with: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] gem install watir yields error: hoe requires RubyGems version 1.4 tried 'gem update --system', but no improvement I have installed successfully on other pcs w/ same, but failing here. Thoughts? -- 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
Re: [wtr-general] Re: Error on Watir installation
I'd definitely recommend Ruby 1.8.7 over 1.8.6. It comes with a newer version of rubygems Check instructions at http://watir.com/installation for location of binary Cheers, Tim @90kts On Tue, Mar 22, 2011 at 11:05 AM, blkjk blkjk@gmail.com wrote: That did not work either. :( On Mar 21, 4:11 pm, Tim Koopmans tim.ko...@gmail.com wrote: For the time being, install rubygems manually, I've been having similar trouble with firewatir and ubuntu http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.zip unzip rubygems-1.6.2.zip ruby rubygems-1.6.2/setup.rb Cheers, Tim @90kts On Tue, Mar 22, 2011 at 10:04 AM, blkjk blkjk@gmail.com wrote: on WIN7 with: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] gem install watir yields error: hoe requires RubyGems version 1.4 tried 'gem update --system', but no improvement I have installed successfully on other pcs w/ same, but failing here. Thoughts? -- 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.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
Re: [wtr-general] How to exit from for loop
http://xkcd.com/292/ Regards, Tim Sent from my mobile ... On 19/03/2011, at 1:44 AM, Dave McNulla mcnu...@gmail.com wrote: Another Ruby question. You could try a break: http://www.wellho.net/mouth/962_Breaking-a-loop-Ruby-and-other-languages.html My favorite is goto for i in1..5 blah blah blah goto funnyfarm if i.am.crazy end :funnyfarm puts help, I'm in a batch script and I can't get out Sorry, just having a little fun this morning. Dave -- 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
Re: [wtr-general] Re: Measure response time with fireEvent(onmouseup)
What is that plugin class ? Regards, Tim Sent from my mobile ... On 17/03/2011, at 9:29 PM, vin vinay...@gmail.com wrote: Hi Guys, Debugging further shows that with sleep the response time and bytes recieved are proper but when sleep is removed the time and recieved bytes are zero. Also, without sleep navigation to multiple pages is very fast (script will not wait until page is laoded). Script with sleep: - plugin.Clear() plugin.Log.EnableFilter(false) plugin.Record() ie.div(:id, configure_access_left).fireEvent(onmouseup) 1st page sleep 10 ie.div(:id, configure_nat_left).fireEvent(onmouseup) 2nd page sleep 10 plugin.Stop() if plugin.Log.Pages.Count != 0 page1= plugin.Log.Pages(0).Entries.Summary printf Total time to load page (secs): %.3f\n, page1.Time printf Number of bytes received on network: %d\n, page1.BytesReceived end ## output with sleep Total time to load page (secs): 5.199 Number of bytes received on network: 427 ##Script without Sleep ie.div(:id, configure_access_left).fireEvent(onmouseup) 1st page ie.div(:id, configure_nat_left).fireEvent(onmouseup) 2nd page plugin.Stop() #ouptput: - Total time to load page (secs): 0.002 Number of bytes received on network: 0 Kindly let me know the cause for this behaviour and also better solution to use for page to laod before navigation to next page. On Mar 17, 1:06 am, vin vinay...@gmail.com wrote: Hi, I am using fireevent to click a div (button to navigate to a page) as shown: (ie.div(:id, configure_access_left).fireEvent(onmouseup) ### irb(main):004:0* b = Watir::Browser.new = #Watir::IE:0x287a2d0 url=about:blank title= irb(main):005:0 irb(main):006:0* b.goto http://abc-blue; = 1.96875 shows time irb(main):007:0 b.div(:id, configure_access_left).fireEvent(onmouseup) = nil shows as nill irb(main):008:0 By using above method, navigate to a required page is achieved but the response shows as nil instead of the time. The scenario is server- client and upon navigation to a page client will fetch the data from the server. Here is the snippet captured with firebug: POSThttp://abc-blue/jsdm/ajax/access.php200 OK 571ms sajax(line 150) ParamsHeadersPostPutResponseCacheHTMLXML Response Headersview source DateThu, 17 Mar 2011 04:57:44 GMT Server Mbedthis-Appweb/2.4.0 Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre- check=0 Content-Typetext/xml; charset=UTF-8 Etag1368cc-296f-503300 Content-Length 35 Connection keep-alive Keep-Alive timeout=60, max=95 X-Powered-ByPHP/5.3.2 Expires Thu, 19 Nov 1981 08:52:00 GMT Pragma no-cache Request Headersview source Hostsrx-blue User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729) Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Method POST /jsdm/ajax/access.php HTTP/1.1 Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8 Refererhttp://abc-blue/login Please let me know if i can achieve it from any other method. Thanks, Vin -- 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
Re: [wtr-general] How to click a button which is having all the property dynamic ?
who was the interview for? Cheers, Tim @90kts On Tue, Mar 15, 2011 at 5:53 PM, meaculpa harismah...@gmail.com wrote: Hi, For an interview, I was asked this question How to click a button, which have all its properties changing dynamic ? I searched and was not able to find a solution. Can anyone please help -- 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
Re: [wtr-general] Re: Re-Usable Load Testing with Watir : Optimize loadtester.rb
Personally I've used WatirGrid[1] with great success, I used it to drive 50 browsers concurrently. 50 is not the ceiling, I was just limited by how many boxes I had at hand. The limitation with browser based testing is the resources required on which to drive the browsers! BrowserMob have reduced this (but they only support Selenium). I'm thinking of something similar for Watir users. I've also been experimenting with headless tests (watir-webdriver with htmlunit) with a fair amount of success, which increases your bang-for-box. I'll talk about some of this at Watir day in any case. In my experience, not every load test is thousands of users. I've load tested some awful intranet apps that have fallen over well before 100 users ... So you may get some mileage out of Watir yet ... Protocol level testing is probably better for load tests with thousands of users though based on bang-for-box. I expect there's an undiscovered sweet spot somewhere there where the cost per vuser shifts in favour of protocol level (when using commercial licensed tools) testing. Cheers, Tim @90kts https://github.com/90kts/watirgrid/blob/master/EXAMPLES.rdoc On Tue, Mar 15, 2011 at 4:21 AM, Chuck van der Linden sqa...@gmail.comwrote: Generally speaking, in order to handle a large pool of threads and be able to scale the load, most loadtesting is done at the protocol (HTTP) level, not using full blown browser based clients. Since most load is not from simple page hits against static or cached pages, you need to actually be interacting with the server as would a large number of unique users. Most decent webservers can serve cached copies of a static page until the pipe saturates without overloading the server or the back end. So having 200 users doing the same search, doesn't create the load you need. So what you need is a system where thread to use its own unique data, so you can simulate a hundred different users, shopping for 80-100 different items, or doing different searches or whatever. (and 100 is just to start, a true loadtest often simulates interacting with many thousand users over a period of an hour or so) While I might use Watir to conduct a functional test DURING a loadtest, I would not use it to apply the load. Despite the existence of the example, I personally would not do loadtesting with watir. I'd use something like the loadtesting tool in VS2010, Jmeter, or if you can afford it, Loadrunner. (which one would work best and provide the best bang for the buck depends on your server environment) On Mar 11, 10:30 am, pierrelebai...@gmail.com pierrelebai...@gmail.com wrote: Hi, to see there are realy diffrent thread that are running change : ...(Thread #{i} executed... by ...(Thread #{Thread.current} executed ... in log file information for loadtester.rb which can be download here : http://wiki.openqa.org/display/WTR/Re-Usable+Load+Testing+Example best regards, plebailly -- 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
Re: [wtr-general] Watir Book
Just bought a copy! Well done Željko for taking the initiative. I look forward to the end result =) Cheers, Tim @90kts On Tue, Mar 15, 2011 at 11:12 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Hi, I have started writing a book on Watir. My family has agreed that I can work on the book for about 8 hours almost every Saturday. The source (markdown) will always be free at Github[1] and I plan to sell the pdf for $9. I know I will not get rich by writing a book on Watir, but some money would be nice. Version 0.1.1 of the pdf is available now[2], for free. If you think there needs to be a book on Watir, and you think I am the right person to write it, feel free to buy the book now[3]. You will get all updates to the book for free. (Well, version 0.1.1 can be downloaded for free anyway.) I promise I will not take the money, spend it on beer and never write the book. :) If I see I will not finish the book, I will return the money. Also, if you buy the book and you do not like it, I will return the money. If you like the idea, but do not have $9, feel free to send any amount to zeljko.fili...@gmail.com via Paypal. You can also donate to the book via Flattr[4]. I appreciate any amount. Željko -- [1] https://github.com/zeljkofilipin/watirbook [2] https://github.com/zeljkofilipin/watirbook/downloads [3] https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=WVJATC56MJS3N [4] https://flattr.com/thing/147956/Watir-Book -- 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
Re: [wtr-general] Watir Day 2011 Speakers Announced
Looks fine to me Alister. Cheers, Tim @90kts On Tue, Mar 8, 2011 at 3:56 PM, Alister Scott alister.sc...@gmail.comwrote: The speakers have been announced for Watir Day: http://watir.com/2011/03/08/watir-day-2011-speakers-announced/ http://watir.com/watir-day/speakers/ Cheers, Alister Scott Brisbane, Australia Watir Web Master: http://watir.com Blog: http://watirmelon.com LinkedIn: http://www.linkedin.com/in/alisterscott There are two ways to get enough: One is to continue to accumulate more and more. The other is to desire less. *~ G. K. Chesterton* -- 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
Re: [wtr-general] how to get slectlist box option value
b.select_list(:name = phone_type).options.collect {|o| o.text[/\w/]} or this b.goto 'http://tinyurl.com/6f8v92t' Cheers, Tim On Fri, Feb 25, 2011 at 5:28 PM, Rajiv Nanduani rajivkumarnandv...@gmail.com wrote: Hi All, I am facing a problem with watir for list box object. I have to extrach the value of select item in list box instead of text value Like.. select size=1 name=phone_type option value=- Select One --/option option selected= value=MMobile Phone/option option value=ODaytime Phone/option option value=HEvening Phone/option /select Here i need the value property value like M , O , H please suggest how to get this value using watir/ruby -- RAJIV KUMAR http://rajivkumarnandvani.wordpress.com/ http://learnqtphelp.blogspot.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
Re: [wtr-general] how to run watir in background on linux
why don't you try watir-webdriver with HtmlUnit driver for headless automation. Cheers, Tim On Fri, Feb 25, 2011 at 7:03 PM, warlock vinay.beck...@gmail.com wrote: hi guys how to run watir in background on linux i tried the -b tag to the script.. but this doesnt work on linux... basically if i wanna run it a 100 times i dont want the browser to open up those many times.. too much resource going there.. :( -warlock -- 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
Re: [wtr-general] unknown property or method document HRESULT error 0x800706b5
Run watir from a shell with admin privs. http://jira.openqa.org/browse/WTR-427 Cheers, Tim On Fri, Feb 25, 2011 at 11:55 PM, TCBlues tcbl...@gmail.com wrote: Watir: 1.6.5 Windows 7 64 bits Ruby 1.8.7 When running this code: require 'watir' nav=Watir::IE.new() nav.goto(http://www.google.com;) puts nav.url nav.close() I get this error: unknown property or method `document' HRESULT error code: 0x800706b5 The interface is unknown. I was surfing the internet but nothing is working in my case -- 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
Re: [wtr-general] Re: Error on running script for first time
186 ruby has an old version of rubygems. Try using 187 version of ruby or update rubygems manually. Instructions are at Watir.com under installation. Regards, Tim Sent from my mobile ... On 24/02/2011, at 7:47 PM, Ashu ashay.n...@gmail.com wrote: On installing watir-webdriver gem... C:\Ruby186\gemsgem install watir-webdriver ERROR: http://rubygems.org/ does not appear to be a repository Building native extensions. This could take a while... ERROR: Error installing watir-webdriver: ERROR: Failed to build gem native extension. C:/Ruby186/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... no checking for ruby_thread_has_gvl_p()... no checking for ruby_native_thread_p()... no checking for rb_thread_call_with_gvl()... no creating extconf.h creating Makefile make 'make' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in C:/Ruby186/lib/ruby/gems/1.8/gems/ ffi-1.0.6 f or inspection. Results logged to C:/Ruby186/lib/ruby/gems/1.8/gems/ffi-1.0.6/ext/ ffi_c/gem_make .out As it required Runtime Dependencies - gem install selenium-webdriver which again required rubyzip and rubyzip required childprocess thereby finally the Runtime Dependencies ffi ~ 0.6.3 So for every gem file installation the above error occurs. plz Help *I have downloaded all the above stated gems On Feb 22, 2:20 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Feb 22, 2011 at 9:23 AM, Ashu ashay.n...@gmail.com wrote: Despite installing jssh for Firefox, the following error occurs. Try watir-webdriver gem, it drives Firefox (and other browsers) and you do not have to install jssh: http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/ Ž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 -- 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: Need to get/retrieve value
Chuck actually I tend to agree with all your comments there. I've been away from wtr-general for a while and am now amazed (after a week of trawling) at the quality, or lack-thereof, of requests for help. In hindsight, maybe he should just try gem install captchavundarbarbreaker Still, I always like a challenge and was tempted to put more thought into it. Maybe next time =) Cheers, Tim On Fri, Feb 25, 2011 at 6:23 PM, Chuck van der Linden sqa...@gmail.com wrote: Tim, I'm not saying he's a spammer.. (but one could be watching) I'm applying the LART with such vigor because he's been told about 4 times 'can't do that' and he keeps asking as if we're not telling him the truth or the answer will somehow change, or there is some 'secret solution' using some 'magic gem' that we're just not telling him about. (sh don't tell anyone, but if you find the config.sys file and put User equals-sign ID ten T on the first line in that file that will make it work) and btw if he CAN break the captcha using any of the tools you suggest, I'd recommend he notify his client that they need a better captcha, since if it wont stop him, then it's not likely to stop the spammers. BTW want to know how spammers break captchas? they crowdsource it. They pay people in lesser developed nations something like a tenth of a cent per captcha solved. they use scripts that capture that part of the screen, send the image to a system that sends it to someone logged into to it who 'solves' the puzzle and sends the 'solution' back to the spammer's script where it is entered and then they can submit their spam. since most captchas are just random numbers and letters you dont even have to speak a foreign language to get such a job.. http://www.nytimes.com/2010/04/26/technology/26captcha.html?_r=1hpw So assuming that his client wants to pay for this service, there is a way around it (which as I said, puts a human in the loop) On Feb 23, 2:14 am, Tim Koopmans tim.ko...@gmail.com wrote: So let's just go easy on the guy! It's not an entirely unreasonable request, and not really up to us to judge it. It may well be legit! Depending on the quality of the CAPTCHA it may in fact be possible. But you'd probably have to wrap in an OCR library with some image processing (to TIFF) beforehand. For image processing I'd recommend rmagick[1]. For OCR you could look at gocr[2], ocrad[3] or tesseract[4] [1]http://rmagick.rubyforge.org/ [2]http://jocr.sourceforge.net/ [3]http://www.gnu.org/software/ocrad/ [4]http://code.google.com/p/tesseract-ocr/ Good luck with that! Cheers, Tim On Wed, Feb 23, 2011 at 8:07 PM, Chuck van der Linden sqa...@gmail.comwrote: THERE IS NO SUCH GEM. NO. HELL NO. and a Thousand Times I tell you NO. The purpose of a captcha is a challenge to prove that it is a human at the computer, to prevented scripted attacks on the site from spammers and the like. The site cannot tell a scripted interaction from a tester from a scripted interaction from a spammer or other attacker. if the client needs you to test against production then you need to test pages with a captcha manually, or they would need to temporarily disable the captcha for the duration of the test, or set it to use a fixed answer for the duration of the test. You CANNOT script against a working captcha without a human in the loop. That's the design and purpose of a captcha. And if you somehow found a way to do that, then the client needs a better quality captcha, because if you can figure out a way, so will the spammers. NOBODY who isn't a spammer is likely to develop a means to get around captchas because we know it would then be immediately discovered and used BY spammers, and nobody wants to help spammers. Nobody here is going to help YOU do the same thing for the same reason, even if you are not a spammer, one could come along later and read the answer. stop trying to go there. Likewise, there is no way for the site to know your scripted interaction (against a production site) is 'safe' that would not potentially be used or exploited by spammers.. so I strongly discourage anything along those lines as it would just be introducing a chink in the sites defenses that could later be exploited to attack the site. If your client is asking you to write scripting against pages with captchas, point out to them that this is a bit like asking you to move an object they designed to be immovable. On Feb 22, 9:15 am, Aditya vaditya2...@gmail.com wrote: A good idea already thinking the same. But the client needs on production environment too. So do we have any gem atleast once the page is loaded can we get the value after page is displayed? Any idea ? On Tue, Feb 22, 2011 at 7:36 PM, Basim Baassiri ba...@baassiri.ca wrote: I've had a similar problem in automating a signup page that had a captcha on it. I solved
Re: [wtr-general] Re: Need to get/retrieve value
So let's just go easy on the guy! It's not an entirely unreasonable request, and not really up to us to judge it. It may well be legit! Depending on the quality of the CAPTCHA it may in fact be possible. But you'd probably have to wrap in an OCR library with some image processing (to TIFF) beforehand. For image processing I'd recommend rmagick[1]. For OCR you could look at gocr[2], ocrad[3] or tesseract[4] [1] http://rmagick.rubyforge.org/ [2] http://jocr.sourceforge.net/ [3] http://www.gnu.org/software/ocrad/ [4] http://code.google.com/p/tesseract-ocr/ Good luck with that! Cheers, Tim On Wed, Feb 23, 2011 at 8:07 PM, Chuck van der Linden sqa...@gmail.comwrote: THERE IS NO SUCH GEM. NO. HELL NO. and a Thousand Times I tell you NO. The purpose of a captcha is a challenge to prove that it is a human at the computer, to prevented scripted attacks on the site from spammers and the like. The site cannot tell a scripted interaction from a tester from a scripted interaction from a spammer or other attacker. if the client needs you to test against production then you need to test pages with a captcha manually, or they would need to temporarily disable the captcha for the duration of the test, or set it to use a fixed answer for the duration of the test. You CANNOT script against a working captcha without a human in the loop. That's the design and purpose of a captcha. And if you somehow found a way to do that, then the client needs a better quality captcha, because if you can figure out a way, so will the spammers. NOBODY who isn't a spammer is likely to develop a means to get around captchas because we know it would then be immediately discovered and used BY spammers, and nobody wants to help spammers. Nobody here is going to help YOU do the same thing for the same reason, even if you are not a spammer, one could come along later and read the answer. stop trying to go there. Likewise, there is no way for the site to know your scripted interaction (against a production site) is 'safe' that would not potentially be used or exploited by spammers.. so I strongly discourage anything along those lines as it would just be introducing a chink in the sites defenses that could later be exploited to attack the site. If your client is asking you to write scripting against pages with captchas, point out to them that this is a bit like asking you to move an object they designed to be immovable. On Feb 22, 9:15 am, Aditya vaditya2...@gmail.com wrote: A good idea already thinking the same. But the client needs on production environment too. So do we have any gem atleast once the page is loaded can we get the value after page is displayed? Any idea ? On Tue, Feb 22, 2011 at 7:36 PM, Basim Baassiri ba...@baassiri.ca wrote: I've had a similar problem in automating a signup page that had a captcha on it. I solved it by implementing in the production code to detect the test environment and when the test environment was evaluated the captcha was hardcoded to QAQA and hence i used that string to proceed with the signup page Hopefully that can help you On Tue, Feb 22, 2011 at 5:30 AM, Aditya vaditya2...@gmail.com wrote: Thanks for the valuable information. Can i use rmagick gem in order to validate the captcha? and can i use it in watir? On Tue, Feb 22, 2011 at 3:50 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Feb 22, 2011 at 11:17 AM, Aditya vaditya2...@gmail.com wrote: How do we handle in terms of automation? Captchas are made explicitly so they could not be automated. If I had to automate site that used Captcha, I would test them manually. Ž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.com -- 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.com -- 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.com- 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 -- 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: Unable to locate element
If it's in a frame you need to prefix the element selector with that frame: ie.frame(:index, 1).button(:name = 'SDP_0_0') Cheers, Tim @90kts On Fri, Feb 18, 2011 at 10:04 PM, Ashu ashay.n...@gmail.com wrote: yes there is 1 frame irb(main):014:0* ie.show_frames There are 1 frames frame: name: index: 1 = 0..0 irb(main):015:0 unlike any other page wherin I can see the name of the frame Here the name is not displayed On Feb 18, 2:47 pm, Chuck van der Linden sqa...@gmail.com wrote: are there Frames on the page perhaps? On Feb 17, 11:41 pm, Ashu ashay.n...@gmail.com wrote: On trying the above line of code irb displays irb(main):045:0 ie.image(:alt, 'Open SDP file').wait_until_present Watir::Exception::UnknownObjectException: Unable to locate element, using :alt,Open SDP file from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:907:in `assert_exists' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:1266:in `method_missing' from (irb):45 from :0 :-( On Feb 17, 2:00 pm, Alastair Montgomery doodl...@gmail.com wrote: Is it possible that you are trying to access the element before it has had time to render? We use jQuery and its elements sometime take a while to render fully. Try putting a line of *ie.image(:alt, 'Open SDP file').wait_until_present* before you attempt to click on it.- 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 -- 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 launching] Unable to launch Watir by require 'watir'
Oops thanks! Fixed the typo =) Cheers, Tim On Sat, Feb 19, 2011 at 7:48 AM, mmauric michel.maur...@yahoo.fr wrote: Hi Tim, Thank you very much for your help, It works now both, by the command line or by setting the OPTRUBY variable. I have just seen a little mistake in your change in the documentation, you wrote require 'rubgyems' instead of require 'rubygems'. Regards. Michel On 17 fév, 22:09, Tim Koopmans tim.ko...@gmail.com wrote: Try require 'rubygems' Before your require for Watir... Or set your RUBYOPT environment variable ... Regards, Tim On 18/02/2011, at 8:06 AM, mmauric michel.maur...@yahoo.fr wrote: As explained in the getting started, I have installed ruby-1.8.7-p330 with the option to update the path variable on Windows 7 pro and performed: gem update --system gem install watir - watir-1.7.1 is installed (all seems right) Then I try to launch Watir and here is below the error message I get: C:\Ruby187irb irbmain:001:0require 'watir' LoadError: no such file to load --watir from irb:2in 'require' from irb:2 irbmain:003:0 With Ruby-1.8.7, I have got some successfully cases (answer =true), but I have not understood the scenario to reproduce. I have tried with different current directories and other versions of ruby without more success. Thank you for your help. Regards. -- 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.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
Re: [wtr-general] [Watir launching] Unable to launch Watir by require 'watir'
Try require 'rubygems' Before your require for Watir... Or set your RUBYOPT environment variable ... Regards, Tim On 18/02/2011, at 8:06 AM, mmauric michel.maur...@yahoo.fr wrote: As explained in the getting started, I have installed ruby-1.8.7-p330 with the option to update the path variable on Windows 7 pro and performed: gem update --system gem install watir - watir-1.7.1 is installed (all seems right) Then I try to launch Watir and here is below the error message I get: C:\Ruby187irb irbmain:001:0require 'watir' LoadError: no such file to load --watir from irb:2in 'require' from irb:2 irbmain:003:0 With Ruby-1.8.7, I have got some successfully cases (answer =true), but I have not understood the scenario to reproduce. I have tried with different current directories and other versions of ruby without more success. Thank you for your help. Regards. -- 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
Re: [wtr-general] [Watir launching] Unable to launch Watir by require 'watir'
Good idea, I've since updated this page to reflect. Loading RubyGems If you’re a first time Ruby user, you need to understand how to load Ruby gems such as Watir. You can require it via the -rubygems command line option or by using the RUBYOPT environment variable. You can also require it manually in your script: require 'rubgyems' For more information see herehttp://docs.rubygems.org/read/chapter/3#page70 . Cheers, Tim On Fri, Feb 18, 2011 at 8:41 AM, Bill Agee billa...@gmail.com wrote: I think it's time to start updating Watir documentation with a require 'rubygems' step (or at least a note warning about the issue). A lot of folks installing Ruby on Windows for the first time are winding up without the RUBYOPT env var, and thus have a rockier first experience than those of us who came to Watir in the legacy one-click installer days. :) I think a good place to start would be: http://watir.com/examples/ Is it pretty easy to update? I suppose a number of other docs would need to be changed too...not sure what the most popular destinations are these days for folks evaluating Watir. Thanks Bill On Thu, Feb 17, 2011 at 1:09 PM, Tim Koopmans tim.ko...@gmail.com wrote: Try require 'rubygems' Before your require for Watir... Or set your RUBYOPT environment variable ... Regards, Tim On 18/02/2011, at 8:06 AM, mmauric michel.maur...@yahoo.fr wrote: As explained in the getting started, I have installed ruby-1.8.7-p330 with the option to update the path variable on Windows 7 pro and performed: gem update --system gem install watir - watir-1.7.1 is installed (all seems right) Then I try to launch Watir and here is below the error message I get: C:\Ruby187irb irbmain:001:0require 'watir' LoadError: no such file to load --watir from irb:2in 'require' from irb:2 irbmain:003:0 With Ruby-1.8.7, I have got some successfully cases (answer =true), but I have not understood the scenario to reproduce. I have tried with different current directories and other versions of ruby without more success. Thank you for your help. Regards. -- 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.comhttp://groups.google.com/group/watir-general%0awatir-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
Re: [wtr-general] Re: Unable to locate element
Technically it is a button (input type=image) http://wiki.openqa.org/display/WTR/Buttons So use ie.button(:name = 'SDP_0_1').click Cheers, Tim On Fri, Feb 18, 2011 at 4:52 PM, Ashu ashay.n...@gmail.com wrote: SDP_0_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
[wtr-general] Re: Webdriver problems on Chrome
Can you share the page being accessed or is it on an intranet site? Regards, Tim On Feb 17, 5:41 am, xguarder shams...@gmail.com wrote: I just started using watir-webdriver, and was able to make it work well with Firefox. I am running into some problems on Chrome though (all on Mac OSX). Here is what I am observing. I type the following into irb, and all is good so far... irb(main):001:0 require 'rubygems' = true irb(main):002:0 require 'watir-webdriver' = true irb(main):003:0 $browser = Watir::Browser.new(:chrome) = #Watir::Browser:0x1016e7a88 url= title= After the 3rd step a Chrome session is launched, with a message stating ChromeDriver server started and connected. Please leave this tab open. Now, I go to my company's page... irb(main):004:0 $browser.goto(http://www.whatever.com;) = http://www.whatever.com/; A new tab is opened that has loaded the page. However, if I do a $browser.text, I am told Selenium::WebDriver::Error::NoSuchElementError: Was not on a page, so could not find elements . This does not happen on other sites like google or ebay. And I do not have this problem when using Firefox. Is there any known issues with Chrome being able to interact with certain types of pages? Thanks in advance! -- 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: [Wtr-development] Vapir
This makes no sense to me. Shouldn't we just merge important changes like modal support into Watir main? Or am I missing something? Is vapir a silent protest of sorts? Regards, Tim On 06/05/2010, at 3:47, Ethan notet...@gmail.com wrote: Dear Watir people, I am happy to announce the release of the Vapir library, which is a fork of Watir and FireWatir. It is documented primarily at the github wiki at http://wiki.github.com/vapir/vapir/ Documentation is sorely lacking at the moment, and improving it is my highest priority, but putting the code out for people to use preceded that. Links to other aspects of the forked project are listed at http://vapir.org/ The API is in most cases the same, with some changes where I felt it was best; these are enumerated at http://wiki.github.com/vapir/vapir/differences-from-watir-api It is a release candidate currently, and can be installed using the --pre flag to rubygems (rubygems 1.3.6 is required; run gem update --system if you are on an earlier version). gem install --pre vapir-firefox gem install --pre vapir-ie Major improvements over Watir are: - Modal dialog API which is (mostly) consistent between IE and Firefox - http://wiki.github.com/vapir/vapir/modal-dialogs - Unified codebase for both Firefox and IE interaction - basically, everything that works in IE works in Firefox as well, which is not the case with FireWatir. - Many bug fixes and feature enhancements for issues in Watir's issue tracker, which will be documented more thoroughly on the wiki in the coming days. I would encourage any questions or discussion to go to Vapir's mailing list, not Watir's. The forked project is intended to stand on its own, separate from the Watir library due to a great deal of changes in the codebase which make it to some degree (a small degree, hopefully) incompatible. Support will be on Vapir's mailing list at http://groups.google.com/group/vapir -Ethan ___ Wtr-development mailing list wtr-developm...@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Answering incomplete requests
I also like the tone of that page. I think it's a really bad idea to either humiliate people or go over- the-top with rules like SQAForums. Maybe some people are lazy, others might just be ignorant but I try not to judge as I don't know their circumstances. The questions I've answered here and via justaddwatir.com were well placed and helped me understand watir better in answering them so it's been a positive experience for me. Guess what I'm saying, the choice is the collective (ours) as to whether or not poorly described problems get answered! Cheers Tim On Oct 26, 9:36 am, Bret Pettichord b...@pettichord.com wrote: Jari Bakken wrote: On Fri, Oct 23, 2009 at 10:01 PM, Ethan notet...@gmail.com wrote: Perhaps a wiki page on what information is needed from people in order for them to get help - the initial response could just be a link to that page, and if they don't reply with information that generally conforms to what is required, it gets ignored. I totally agree with this. Check out the Before you ask section here:http://wiki.github.com/aslakhellesoy/cucumber/get-in-touch I really like the tone of that page. Maybe we could modify our support page to sound a little more like this. Bret -- Bret Pettichord Lead Developer, Watir,www.watir.com Blog,www.io.com/~wazmo/blog Twitter,www.twitter.com/bpettichord --~--~-~--~~~---~--~~ 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: Performance Testing
At the company where I work using oss tools for performance testing (www.altentee.com) we often use JMeter to 'spin up the wheels' or as Chuck put it, conduct 'protocol' level testing. At the same time we also run a quasi-smoke test if you like, using Watir to conduct 'browser' level testing. Protocol level tests do apply load differently albeit in subtle ways. Things like re-use or discontinued use of http connections, parallel execution of browser threads, client render time (DOM tree parsing and javascript processing) sometimes have an effect on end user response time. I have seen peculiar behavior of browsers (particularly IE) when the SUT is under load or when emulating network conditions (latency bandwidth). Things like '1 items remaining' or hung AJAX calls or even large discrepancies b/w protocol level response time and *actual* browser level response times... That's why we see significant value in using Watir + JMeter/the Grinder/OpenSTA at the same time. Operations such as BrowserMob (using selenium to control ur botnet) is useful in the sense it does sometimes simplify the script effort for your load test. We generally script 80% of the SUT with JMeter, but the other 20% often complicated by pesky AJAX controls and the like are sometimes easier done in Selenium and/or Watir. Another great use of Watir is to generate your load scripts in JMeter from Watir scripts. It sounds like overkill, but if you know you will be re-scripting again and again due to successive code drops etc, it's often easier to generate maintain these from Watir scripts i.e. playback watir with the JMeter/Badboy proxy/recorder after each code drop. Once you get familiar with the SUT you generally have a template bunch of regex extractors etc to apply to your freshly generated load scripts. I prefer to read Watir scripts rather than look at .jmx or .c files... Regards, Tim Koopmans On Apr 6, 9:21 am, Chuck van der Linden sqa...@gmail.com wrote: On Apr 3, 2:56 am, sai saidesertrose2...@gmail.com wrote: Even if you use http clients to generate requests and load test the app it is advisable to use real browsers to do some kind of load testing because thats how the app is going to be used in the end through real internet in the middle. Yes, that's how it will be 'used' but how can the server tell? The point of a loadtest is to see how your servers hold up under load, that load takes the form of http requests.. How exactly is the server supposed to be able to tell the difference between requests generated by a browerser, or a protocol evel tool that emulated the requests sent by the browser? I fail to see what value you are adding for the expense of having to maintain scripts for two different platforms (protocol level vs browser level). If you REALLY want to experience the 'user experience' while the test is running, just interact manually with a browser. The approach I take is when we are developing a functionality in an iteration I tend to use something like http clients to find bottlenecks and correct them. This gives me a fast feedback on parts I need to concentrate on. But once the app is in good shape where I can use it I tend to prefer using real browsers to test it along with http clients. The advantage of real browser approach is it is how the app will be used as well it takes away lots of complexities like ajax processing, streaming away from you. Again I fail to see the advantage.. emulating ajax processing doesn't matter, all that matters is what kind of post or get resuts when that processing is done and the user responds to it. If there's a delay due to the ajax or the user 'reading' or filling in a form or whatever, that's what Think Time is for. Steaming can be trickier I'll admit, but there are some things out there for testing flash and such that will let you start up a large number of streams and maintain them for however long you want. But ultimately we get back to the question of 'how can the server tell the difference' because if it can, then you have an issue with your loadtest tool, and if it can't why bother with the browser? The disadvantage is it is not possible to run more than three browsers at a time as they are resource heavy. There's also the expense of maintaining two sets of scripts/tests. And so clouds may help to scale in this issue. IF you have a suitable connection to the intenet that you can afford to load up with cloud traffic perhaps.. If you are running a production site you dare not clog it's pipe with loadtest traffic. So that means you need two more pipes one for the cloud load to arrive on, and one for a 'back channel' that you use to control the cloud, and receive instrumentation regarding response times, lost packets or failed responses, and perhaps telemetry as to what the scripts are doing at a particuar moment.. which you wil then need to correlate with the instrumentation
[wtr-general] Re: Ruby integration with TestLink
Natasha, there's an API already available which you could use as a client. As Manish has mentioned, it would be relatively simple to execute test cases. To update, you could just use the sample ruby client implementation ... Do you have specific functionality in mind that you're looking to implement? If so, it might be worth mentioning so some of us can have a hack at it =) Regards, Tim Koopmans snip #!/usr/bin/env ruby # Testlink API Sample Ruby Client implementation require 'xmlrpc/client' class TestlinkAPIClient # substitute your server URL Here SERVER_URL = http://qa/testlink_sandbox/api/xmlrpc.php; def initialize(dev_key) @server = XMLRPC::Client.new2(SERVER_URL) @devKey = dev_key end def reportTCResult(tcid, tpid, status) args = {devKey=@devKey, tcid=tcid, tpid=tpid, status=status} @server.call(tl.reportTCResult, args) end end # substitute your Dev Key Here client = TestlinkAPIClient.new(f2a979d533cdd9761434bba60a88e4d8) # Substitute for tcid and tpid that apply to your project result = client.reportTCResult(1132, 56646, f) # Typically you'd want to validate the result here and probably do something more useful with it puts result was: %s %(result) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: ERROR installing watir
This happens to me a lot. Try installing from gem files downloaded manually. There's some instructions on how to do this here: http://justaddwatir.com/watir/q-how-do-i-gem-install-watir-behind-a-proxy-server/ Check out the comments section for recent example. Regards, Tim Koopmans --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---