[wtr-general] Re: Watir Ruby Screenshot show Scenario + Step

2017-10-18 Thread Alan Baird
See this page if you are wanting to do this for Cucumber: https://cucumber.io/docs/reference#report-attachments On Wednesday, October 18, 2017 at 10:46:00 AM UTC-5, 江南 wrote: > > Hi, > > Is it possible to save a screenshot with the step instead the scenario > name? > >

Re: [wtr-general] Re: watir webdriver and extjs = split button click problem

2012-06-01 Thread Alan Baird
MN - I've tangled with this control before. ExtJS is lame because you have things like this button which doesn't have discrete HTML for all of it's elements (the button and the associated drop down). You have two options, you can: 1) use the mouse to try and move the click point to the dropdown

Re: [wtr-general] questions from newbie

2011-09-01 Thread Alan Baird
Duke - This is how I get this value in IRB: C:\Users\Alanirb --noreadline irb(main):001:0 require 'watir' = true irb(main):002:0 br = Watir::Browser.attach(:url, //) = #Watir::IE:0x4b1a0f4 url=https://www.google.com/accounts/ServiceLogin?service=mail; title=Gmail: Email from Google

[wtr-general] Hoe breaks Watir on fresh install

2011-02-04 Thread Alan Baird
While helping a colleague of mine install Watir on his fresh ruby install, we ran into an error where Hoe wanted rubygems = 1.4. I was surprised to find out that Rubygems 1.4, and then shortly thereafter 1.5, were released into the wild very recently. This caused the Watir install to fail since

Re: [wtr-general] Watir 1.7.0.rc1 Released

2010-12-28 Thread Alan Baird
Jarmo - I installed Watir 1.7 --pre and ran it at work with no apparent problems other than with close_all which I will describe shortly. I removed all of my monkeypatches and I am not seeing any of the premature page loads that I saw before. I do want to bake it in a bit more tomorrow but at

Re: [wtr-general] Re: Watir Console issues

2010-11-29 Thread Alan Baird
Done On Sun, Nov 28, 2010 at 11:00 PM, b...@pettichord.com bpettich...@gmail.com wrote: I will maintain this. Could you please open up a Jira ticket with details. You can assign it to me. Bret On Nov 27, 1:22 pm, Alan Baird aba...@bairdsnet.net wrote: Enriquem - A very simple

Re: [wtr-general] Watir Console issues

2010-11-27 Thread Alan Baird
Enriquem - A very simple/hacky fix is to remove -r watir/irb-history from the last line (line 7) of watir-console. This will disable sending irb commands to 'console.log'. I doubt you use this. For some reason, it seems that in 1.8.7, the Readline module has a class History inserted in it

Re: [wtr-general] Re: Switching from Test::Unit to RSpec - tips/gotchas? Short code review.

2010-03-04 Thread Alan Baird
Adam - I think the problem is here: it should contain a table with links do @browser.table(:class, /example/).links.each do |link| @countries [link.text, link.href] end #links @countries.should_not be_empty end #it You are defining @countries in this method

RE: [wtr-general] Re: How to get numbers from String?

2010-02-19 Thread Alan Baird
irb(main):070:0 a = 'Showing 1 to 10 of 72 Records' = Showing 1 to 10 of 72 Records irb(main):071:0 a[/(\d+)\sto\s(\d+)\sof\s(\d+)/, 3] = 72 I couldn't resist sharing this. No disrespect to the other posters but I learned this trick from James Gray recently and think it's a really good trick.

Re: [wtr-general] My blog about Watir and RSpec

2010-02-16 Thread Alan Baird
Jarmo - I'm still reading but this is good stuff. +1 on the font size tho :) Alan On Tue, Feb 16, 2010 at 9:34 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Feb 11, 2010 at 10:34 PM, Jarmo Pertman jarm...@gmail.com wrote: i'm waiting for any feedback I am reading your

Re: [wtr-general] Re: Watir, Rspec, and radio buttons.

2010-02-10 Thread Alan Baird
Marek-thanks...I got it to work as you suggested...exists and even include work for me without using '_be' Alan On Feb 9, 2010 6:33 PM, marekj marekj@gmail.com wrote: On Tue, Feb 9, 2010 at 4:54 PM, Alan Baird alan.ba...@riskmetrics.com wrote: According to http:... Alan, the matchers

Re: [wtr-general] Re: click_no_wait fails when multiple tabs are open in IE7

2010-02-09 Thread Alan Baird
additional debug information like browser url, browser title or html or whatsoever so you know that it can attach to correct window (and not to that other tab for example). Hopefully it helps. Jarmo On Feb 5, 8:50 pm, Alan Baird alan.ba...@riskmetrics.com wrote: Yeah...I know, you all probabl

Re: [wtr-general] fix funky command line behavior in watir-console

2010-02-09 Thread Alan Baird
Marekj- You are using windows right? What I understood about this is that window commandline already had readline in it so putting it in irb was doing it twice which is what was messing up the commandline in windows. I'm not sure what tab tab and ctrl-r does, but I don't use them and i'd rather

Re: [wtr-general] Install Error: While executing gem ... (Gem::InstallError)

2010-02-09 Thread Alan Baird
See the faq on this ... you need to download rubygems separately (this recently changed)...AB On Feb 9, 2010 11:59 AM, Nathan Lane nathamberl...@gmail.com wrote: Sorry that was http://rubyinstaller.org/ On Tue, Feb 9, 2010 at 10:55 AM, Nathan Lane nathamberl...@gmail.com wrote: I installed

Re: [wtr-general] Re: Watir, Rspec, and radio buttons.

2010-02-09 Thread Alan Baird
So charley, does that mean that the rspec predicate matcher for exists? would be ... obj.should be_exists ? On Feb 9, 2010 2:46 PM, James jgcpal...@gmail.com wrote: Ok, solved it myself: textfield.value.should == test is what I needed to do. On Feb 9, 3:21 pm, James jgcpal...@gmail.com

RE: [wtr-general] Re: Watir, Rspec, and radio buttons.

2010-02-09 Thread Alan Baird
According to http://rspec.rubyforge.org/rspec/1.1.9/classes/Spec/Matchers.html it would just be obj.should exist James - I agree that it should be this way, but the way I'm reading this line leads me to believe otherwise: All you need to do is write +should be_+ followed by the predicate

[wtr-general] watir install fubared by win32-api-1.4.6 ??

2010-02-09 Thread Alan Baird
All - Maybe I'm the only one that is having this problem but as I was trying to install Watir today from a fresh install (using ruby 1.8.6 and downloading the rubygems installer), I get the following message: Y:\abaird\ruby_install\rubygems-1.3.5\rubygems-1.3.5gem install watir Building native

[wtr-general] click_no_wait fails when multiple tabs are open in IE7

2010-02-05 Thread Alan Baird
Yeah...I know, you all probably are rolling your eyes already about another click_no_wait problem, but this isn't a problem, it's a statement. I don't know how to fix it but my co-worker James and I just spent a while trying to figure out why click_no_wait wasn't working in his script. To

[wtr-general] fix funky command line behavior in watir-console

2010-02-05 Thread Alan Baird
Here is another cool trick I learned today. I remember how cool it was when I found out about watir-console. You know, that tiny program that's in the /watir/bin folder that automagically requires watir for you when you want to perform some cool irb-style command line stuff with watir?

RE: [wtr-general] RE: Drag and Drop using Watir

2010-01-21 Thread Alan Baird
See this thread for some suggestions: http://groups.google.ca/group/watir-general/browse_thread/thread/d45e56e437bcd9a8 -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of tester86 Sent: Thursday, January 21, 2010 1:38 PM To:

RE: [wtr-general] Re: better way to do a conditional require

2009-12-10 Thread Alan Baird
::VERSION constant. :) That could be nice to have eventually. Thanks Bill On Mon, Dec 7, 2009 at 2:47 PM, Alan Baird aba...@bairdsnet.net wrote: I'm wondering if there is a decent way to do a conditional require. My specific problem is that my framework includes the old .visible? code

RE: [wtr-general] Re: Collection of images where specifiec field matches text pattern

2009-12-10 Thread Alan Baird
Do you know how to keep these nil entries out of the image collection? expand_images.compact (assuming expand_images is an array) This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be

[wtr-general] install for 1.6.2 doesn't work after 1.6.5 release

2009-11-12 Thread Alan Baird
This morning I was helping a coworker get some things up and running with watir and noticed that he had inadvertently got 1.6.5. Since 1.6.5 changes the way .visible? works, we decided to go back to 1.6.2 and make sure everything was ok there. We removed watir, commonwatir and firewatir and

[wtr-general] RE: install for 1.6.2 doesn't work after 1.6.5 release

2009-11-12 Thread Alan Baird
Of Alan Baird Sent: Thursday, November 12, 2009 11:59 AM To: watir-general@googlegroups.com Subject: [wtr-general] install for 1.6.2 doesn't work after 1.6.5 release This morning I was helping a coworker get some things up and running with watir and noticed that he had inadvertently got 1.6.5. Since

[wtr-general] Re: Exception thrown while iterating table

2009-11-04 Thread Alan Baird
Vishal - Normally, I get this error when the table I'm accessing changes during iteration. For example, if you are iterating through a table and some interaction with it adds a row. I can't tell if that's what you are doing here. It seems like you left some things out in the code below

[wtr-general] Re: Answering incomplete requests

2009-11-03 Thread Alan Baird
Bret/Z* - I will update the help page today. Alan On Nov 3, 2009 3:23 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Nov 3, 2009 at 2:00 AM, b...@pettichord.com bpettich...@gmail.com wrote: I guess for now... I am afraid if we do not push it, that change will not happen. I

[wtr-general] Re: Answering incomplete requests

2009-11-03 Thread Alan Baird
I made a first pass at adding some additional stuff to http://wiki.openqa.org/display/WTR/Support. Let me know what you think and if you can make it better please do. Alan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[wtr-general] Re: Click ok on popup

2009-10-28 Thread Alan Baird
Shlomit - You aren't using click_no_wait in your code. You need to read http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups again. Pay particular attention to Solution #4 and #5. Alan On Wed, Oct 28, 2009 at 1:19 PM, Shlomit Gazit shlomitpatr...@gmail.comwrote: I am no longer getting the

[wtr-general] Re: Answering incomplete requests

2009-10-24 Thread Alan Baird
I'm for being more firm, but with limits. We can't help people that can't help themselves - or at least none of us have the time for it. I believe that people with legitimate questions, that don't know how to ask them or use the right words will keep trying if they are lead in the right

[wtr-general] Re: Capturing Java Script Errors

2009-10-17 Thread Alan Baird
Jarmo - I would be interested in seeing an example of your Formatter. I know there is one already out there from the RSpec team, but if you have something different and the time I think it would make a great blog post or addition to the wiki. Alan On Fri, Oct 16, 2009 at 4:44 AM, Jarmo Pertman

[wtr-general] Re: Identifying objects when browser window has no toolbar

2009-10-17 Thread Alan Baird
man...I'm such a dork...sorry Jason...I didn't see you had already suggested this. Alan On Sat, Oct 17, 2009 at 3:10 PM, Alan Baird aba...@bairdsnet.net wrote: We have about the same situation in our office. We were able to issue a CTRL-N on the new browser, which copies the security info

[wtr-general] Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-15 Thread Alan Baird
this help running watir tests on remote machines? Alan Baird wrote: What are you already using? Pretty much what you described. I wrote a rails front end with some *very* simple views and wrapped that around a restful interface that a client ruby script can interact with. All it does

[wtr-general] Re: Hudson, was Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-15 Thread Alan Baird
: [wtr-general] Hudson, was Re: Dwatir - Can this help running watir tests on remote machines? Alan Baird wrote: Bret - I'm looking into this. I see all of the plugins for Selenium and I'm expecting to see something like, Plugin for Ruby Test::Unit or Rspec. Ultimately, Hudson has

[wtr-general] Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-14 Thread Alan Baird
Bret - Can you use Hudson to distribute tests on command (as opposed to in conjunction with some sort of build event)? If so, I would be really interested in how you do that. Alan -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On

[wtr-general] Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-14 Thread Alan Baird
simple. You could build one. On Wed, Oct 14, 2009 at 1:52 PM, Alan Baird alan.ba...@riskmetrics.commailto:alan.ba...@riskmetrics.com wrote: Bret - Can you use Hudson to distribute tests on command (as opposed to in conjunction with some sort of build event)? If so, I would be really interested

[wtr-general] Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-14 Thread Alan Baird
What are you already using? Pretty much what you described. I wrote a rails front end with some *very* simple views and wrapped that around a restful interface that a client ruby script can interact with. All it does is sends down some arguments to the VM that it uses to call a command line

[wtr-general] Re: Get X and Y Coordinates of an Object

2009-10-12 Thread Alan Baird
Pallavi - Here is how to do it with IE: http://wiki.openqa.org/display/WTR/Right+Click+an+Element http://wiki.openqa.org/display/WTR/Right+Click+an+ElementI don't know how to do this in FireWatir although I'm sure there is a way. Anyone know how to do this in FF? Alan On Mon, Oct 12, 2009 at

[wtr-general] Re: Right Click and Element Script

2009-10-12 Thread Alan Baird
by link. Is it something to do with the Page_container ??? Where am i going wrong? Any help.. Thanks Pallavi. On Wed, Sep 30, 2009 at 8:28 AM, Alan Baird aba...@bairdsnet.net wrote: Pallavi - I've tested the code at http://wiki.openqa.org/display/WTR/Right+Click+an+Element a lot

[wtr-general] Re: Html Elements Supported by Watir

2009-10-10 Thread Alan Baird
Big +1 here too. If anyone wants to know how to be a great contributing member to the Watir community just try to do about 1/2 of what Z* does with the same attitude and you will be well on your way. Thanks for all your hard work Z*! Alan --~--~-~--~~~---~--~~

[wtr-general] Re: Click event not working in IE 7

2009-10-10 Thread Alan Baird
Prince - There isn't anything that I'm aware of that would prevent this from working. I run IE7 at work with no problems. Alan On Sat, Oct 10, 2009 at 1:04 AM, Prince3105 prince3...@gmail.com wrote: Hi Experts, I am using below package. Watir version - 1.6.2 Ruby version - 1.8.6

[wtr-general] Re: Right Click and Element Script

2009-09-29 Thread Alan Baird
Pallavi - I've tested the code at http://wiki.openqa.org/display/WTR/Right+Click+an+Element a lot and I'm pretty sure it works. If you run the code that's in the box it should work. I would try that first. You should not have to do any additional requires to make it work (since win32api is

[wtr-general] Re: show_frames not reading nested frames properly

2009-09-23 Thread Alan Baird
Rafael - I'm curious why the page you are showing us is a page you get when you can't see frames. Maybe that's just an example, but I wonder if that is interfering w/ Watir. If you want to try some things out, I have an example for you. Go to http://www.angelfire.com/super/badwebs/ (it's safe,

[wtr-general] Re: Save As File Dialog

2009-09-09 Thread Alan Baird
Jackie - I have had problems with the Save As dialog box not accepting long strings. Apparently there is a length restriction on this field that you may be running into (somewhere around 120 characters). Alan On Thu, Sep 3, 2009 at 8:10 AM, JackieH jkulb...@juno.com wrote: Bill, Thanks so

[wtr-general] click extjs tabs

2009-07-08 Thread Alan Baird
All - I know a lot of you have been trying to get the tabs example in EXTJS to work. At long last I have a solution. It seems that EXTJS checks to ensure that the mousedown is a left mousedown (see http://extjs.com/forum/showthread.php?t=56916). Other than being extremely annoying, Watir

[wtr-general] Re: How to simulate right mouse action

2009-05-19 Thread Alan Baird
http://wiki.openqa.org/display/WTR/Right+Click+an+Element -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Jungle_hunter Sent: Tuesday, May 19, 2009 3:44 AM To: Watir General Subject: [wtr-general] How to simulate right mouse

[wtr-general] Re: Insallation issue

2009-05-12 Thread Alan Baird
Vicky - Are you behind a proxy? Alan -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Vicky Goyal Sent: Sunday, May 10, 2009 3:56 PM To: Watir General Subject: [wtr-general] Re: Insallation issue Both the options did nt wrk

[wtr-general] Re: IE popup example on wiki.openqa.org

2009-05-11 Thread Alan Baird
Jared - This example has not been updated after the 1.6.2 release. The same general approach should work (starting a new thread to kill the popup) but you might have to replace the browser startup depending on whether or not you are using Browser.new. Alan -Original Message- From:

[wtr-general] Re: opposite of should

2009-04-16 Thread Alan Baird
You were s close: browser.text.should_not include('this is good text') -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of James Sent: Thursday, April 16, 2009 3:00 PM To: Watir General Subject: [wtr-general] opposite of

[wtr-general] Re: Problem when iterate through the table

2009-04-15 Thread Alan Baird
Unfortunately I think that table.each still uses the old row_count method. If your problem is that the each itterator tries to access a non existent table row, the easiest way to get around this is to rescue the exception. See below: ...paste this html into an html file named tmp.html and

[wtr-general] rspec 1.2 public service announcement

2009-03-25 Thread Alan Baird
All - I upgraded some of my environment today to the latest version of rspec, which is 1.2. Since I was just doing 'gem install rspec' I automatically got the latest version. I should have paid more attention to the large announcement/warning when updating which admonishes you to check out

[wtr-general] Re: os and browser version

2009-03-25 Thread Alan Baird
Paul - Thanks for that. Since I needed to verify which IE version was installed before starting it, I have a windows only (IE only) script that will get the version of IE from the registry. Probably limited usefulness but here it is just in case it's useful to someone. require

[wtr-general] Re: NoMethodError: undefined method `links' for nil:NilClass

2008-12-10 Thread Alan Baird
Carl - Why are you getting an error for the links method when your fragment uses link? The error message also seems similar to what I get if I try to access methods on an object that is nil (@ie in your case). Alan On Wed, Dec 10, 2008 at 3:59 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

[wtr-general] Re: Help required : Ruby code error

2008-12-01 Thread Alan Baird
Natasha - Not sure if you solved this yet or not but you need to move the include Login statement inside the SB class in testbug.rb. The below worked for me. I had to change Watir::Browser to Watir::IE since I don't have 1.6 installed yet. The below code gets me as far as clicking the login

[wtr-general] Re: Adding Date

2008-11-17 Thread Alan Baird
Sunil - You want the Time class which is one of Ruby's core classes (see http://www.ruby-doc.org/core/ http://www.ruby-doc.org/core/look for the Time class). Here are some examples that may help: irb(main):014:0 require 'time' = true irb(main):016:0 t = Time.parse(30-11-2008) = Sun Nov 30

[wtr-general] Re: table row_count incorrect

2008-10-23 Thread Alan Baird
Paul - This issue is WTR-26 (http://jira.openqa.org/browse/WTR-26)http://jira.openqa.org/browse/WTR-26, it's been around for a while. Your solution looks like the one that is in this ticket. Alan On Thu, Oct 23, 2008 at 9:10 PM, Paul Denize [EMAIL PROTECTED]wrote: Overloading the following

[wtr-general] Re: How to use Watir::Exception::TimeOutException

2008-10-20 Thread Alan Baird
Chethan - Here is how you would apply a timeout loop to the code you provided: require 'test\unit' require 'timeout' class MyTest Test::Unit::TestCase def test_sample_01 begin Timeout::timeout(3) do require testcase_01 # test cases end rescue Timeout::timeout