Re: [wtr-general] RubyMine with Watir, Cucumber, and Page objects

2012-04-05 Thread Adam Reed
Chuck, I know Rubyists are usually scared off by the overhead, but I started using Aptana Studio (Eclipse geared toward Ruby - as a standalone or a plugin) with my new company, and I've been very impressed, especially since Eclipse can integrate with Assembla/Bugzilla/SVN/CVS/GIT/etc, etc,

[wtr-general] Testing theory/approach question from SO

2012-04-05 Thread Adam Reed
I posted this question on StackOverflow this afternoon and just wanted to get some more visibility on it for the folks that may not visit there as often. http://stackoverflow.com/questions/10035371/approach-for-watir-webdriver-coverage-on-site-with-many-clients/10035613#10035613 -- Before

Re: [wtr-general] Testing theory/approach question from SO

2012-04-05 Thread Adam Reed
track of what site/page belongs to what and what fits where but its cooler :) for the forms i would just do something like this http://pastie.org/3735502 i cut out a lot but you get the idea On Thu, Apr 5, 2012 at 4:47 PM, Adam Reed reed.a...@gmail.com wrote: I posted this question

[wtr-general] Best practice for using Active Directory user/pass for script?

2011-11-14 Thread Adam Reed
This started out as an encryption question, but it may end up being a testing best practice question. I have an application that is not customer-facing, so new accounts cannot be created. It uses personal Active Directory information, and we have no (nor are we allowed to obtain) test accounts

[wtr-general] Re: Best practice for using Active Directory user/pass for script?

2011-11-14 Thread Adam Reed
changes are made. Is that as good as it gets? On Nov 14, 10:55 am, Adam Reed reed.a...@gmail.com wrote: This started out as an encryption question, but it may end up being a testing best practice question.  I have an application that is not customer-facing, so new accounts cannot be created

[wtr-general] Re: Need clarification

2011-09-12 Thread Adam Reed
This is not a WATIR-related question. You will have better luck at a general Ruby forum. It sounds like Excel is not installed/registered on that machine. Thanks On Sep 12, 8:49 am, ss skbj...@gmail.com wrote: irbrequire 'win32ole' =true irbexcel = WIN32OLE::new(excel.Application) i get

[wtr-general] Re: Post Requests

2011-08-23 Thread Adam Reed
Mo, your question is not Watir-related as you have described it, so you may have better luck using another Google group. I have not personally used the net/http method (I use Mechanize or Watir/ Webdriver). Have you tried filling out the form and submitting it using Watir? Thanks, Adam On Aug

[wtr-general] Re: should exist in a case statement

2011-08-22 Thread Adam Reed
You will have better luck with support in the RSpec group, and honestly, but reading the RSpec manual/FAQ. You're confusing RSpec conventions with WATIR and mixing the two. http://old.nabble.com/rspec-users-f17460.html http://rspec.rubyforge.org/rspec/1.2.7/ On Aug 19, 10:23 am, Rahul Sharma

[wtr-general] Re: Communicating Watir-Results

2011-04-27 Thread Adam Reed
I use Cucumber, and have used RSpec and Test/Unit in the past - but I know what you mean about actually communicating the results. As far as I know none of these frameworks have email built-in. I have saved the output files from these frameworks to a network drive and/or docroot for a simple

[wtr-general] Re: Slow speed of filling of text area on watir-webdriver

2011-04-25 Thread Adam Reed
Good to know! On Apr 21, 5:32 pm, Jari Bakken jari.bak...@gmail.com wrote: On Thu, Apr 21, 2011 at 8:33 PM, Adam Reed reed.a...@gmail.com wrote: Using text_area.value = string rather than text_area.set string has saved a significant amount of time for my scripts in massive-data- entry

[wtr-general] Re: Slow speed of filling of text area on watir-webdriver

2011-04-21 Thread Adam Reed
Using text_area.value = string rather than text_area.set string has saved a significant amount of time for my scripts in massive-data- entry scenarios. On Apr 21, 10:14 am, Jari Bakken jari.bak...@gmail.com wrote: On Thu, Apr 21, 2011 at 5:07 PM, the_zonker the.zonk...@gmail.com wrote:

[wtr-general] Re: Accessing an unordered list

2011-04-07 Thread Adam Reed
Hi Anne, The reason you're getting that error is that you're using lis rather than li in your code. This is like saying browser.images, as in browser.images.each do |img|... To reach a singular element, you want to use the singular locator. Also, while you are certainly able to click on an li

[wtr-general] Re: checkbox questions

2011-04-04 Thread Adam Reed
Cristina, You may find solutions faster by searching this group using the search box at the top of the page. Both topics have been addressed many times here. 1. ie.checkbox(:name = Checkbox).checked?returns true or false 2. There are a few methods to alter the checkbox value:

[wtr-general] Re: Java Developer - Technical/Product Job Opening - NYC,NY

2011-04-04 Thread Adam Reed
I don't mind these every once in a while but this is the third I've received today. I have changed my stance on the topic to nuke without remorse. On Apr 4, 1:54 pm, Basim Baassiri ba...@baassiri.ca wrote: seriously, this is not a watir related question Please can you stop Thanks Basim

[wtr-general] Re: how to access an element from a multi level nested div/ul/li

2011-03-31 Thread Adam Reed
Cristina, you can copy/paste the relevant html here directly (with care to remove superfluous elements). If the div has an attribute that you can access (class, name, id), the nested list elements may not enter into it: browser.div(:how, what).text will grab all of the text in this div.

[wtr-general] Re: Error on Watir installation

2011-03-30 Thread Adam Reed
I ran into this issue yesterday when installing watir for two new users. We also were forced to upgrade to 1.8.7 (even though two of us had the same build of 1.8.6 and the same version of watir installed...). When attempting to install cucumber, we received another error about a gem being

[wtr-general] Re: Managing multiple version of Watir

2011-03-30 Thread Adam Reed
Also see pik for Windows (I believe it's linked from RVM's site as well): https://github.com/vertiginous/pik/ Adam On Mar 30, 1:23 pm, Tim Koopmans tim.ko...@gmail.com wrote: Rvm ? Regards, Tim Sent from my mobile ... On 31/03/2011, at 12:39 AM, Darryl Brown d-l-br...@roadrunner.com

[wtr-general] Re: Managing multiple version of Watir

2011-03-30 Thread Adam Reed
I'll admit my reply was more of a response to the first comment than the original issue, but I would agree with the explicit versioning comment unless for some reason you wanted to uninstall your gem and install a specific version for each test: gem uninstall watir gem install watir -v 1.6.5 etc.

[wtr-general] Re: Automating the object with in TD tag

2011-01-12 Thread Adam Reed
I think what you're looking for is a way to use Watir to attach to or investigate that TD element. You can find an exact example of that in the Watir Wiki using XPath: http://wiki.openqa.org/display/WTR/XPath puts ie.cell(:xpath, //i...@src='3.jpg']/../).text Adam On Jan 12, 9:28 am, Sanu

[wtr-general] Re: Option in select

2011-01-06 Thread Adam Reed
Put a begin/rescue/end around the offending code and prevent the test from exiting. On Jan 5, 1:08 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote: The problem is also if the title I am looking for doesnt exists I am getting an exception: Watir::Exception::NoValueFoundException: No option

[wtr-general] Re: Can I run tests in IE and FF one by one in the one ruby script?

2011-01-04 Thread Adam Reed
require 'watir' browsers = [ie, firefox] browsers.each do |b| Watir::Browser.default = b browser = Watir::Browser.new browser.goto url end This would work if you were looking to literally run both tests inside of one script, and could also involve multi-threading to run them simultaneous,

[wtr-general] OT: WIN32OLE and Word difficulty

2010-12-11 Thread Adam Reed
I've worked with the win32ole library in my WATIR scripts for a long time, and I've just now stumbled onto a problem that I'm hoping some of you have also encountered. I have a script that reads from various Word file formats (doc, docx), however the documents that are being provided to me from

[wtr-general] Re: $browser.url method

2010-10-22 Thread Adam Reed
Xguarder, This works for me in 1.6.6. What version of Ruby are you using? Can we see your code? It sounds like you might be accessing a different browser variable than you are expecting. Adam On Oct 22, 11:08 am, xguarder shams...@gmail.com wrote: Hello, as of late, anything I run the

[wtr-general] Re: Automating command line tools

2010-09-03 Thread Adam Reed
Try googling ruby ssh or ruby sftp. The first result on either search answers your question. On Sep 3, 8:43 am, Basim Baassiri ba...@baassiri.ca wrote: Watir stands for web application testing in ruby so I believe the answer to your question is no On Fri, Sep 3, 2010 at 9:04 AM, Srinidhi

[wtr-general] Re: Need help with a text field inside a table (watir doesn't see any tables!)

2010-08-24 Thread Adam Reed
Hi Wolfie, and welcome to Watir. How are you accessing the frames in conjunction with show_tables (exact command)? Thanks, Adam On Aug 24, 10:26 am, Wolfie ballard.wolf...@gmail.com wrote: Hello! - Using gem version 1.3.7, Ruby 1.8.7 and watir 1.6.5, IE8 on Windows 7 - HTML

[wtr-general] Re: Need help with a text field inside a table (watir doesn't see any tables!)

2010-08-24 Thread Adam Reed
It was a logical step, just wrong :). Glad you were able to figure it out. Adam On Aug 24, 11:29 am, Wolfie ballard.wolf...@gmail.com wrote: How are you accessing the frames in conjunction with show_tables (exact command)? Bingo - you asked the right question. I was doing the following

[wtr-general] Re: Unable to see error message in ruby interpreter

2010-08-16 Thread Adam Reed
Hi Goutham, It sounds like you're double-clicking the script in order to run it which closes the DOS window upon completion. If installed, you can execute the script using the SciTE editor. Right click on the script, select Edit. The output pane can be enabled using F8 if it is not shown.

[wtr-general] Re: How I can catch the JS errors?

2010-07-29 Thread Adam Reed
Well, the easiest method would be to discover the JS error content manually, and disable the options in your browser for stopping on errors, and/or displaying the contents of JS errors during browsing. Automation isn't always the best solution. Otherwise, Jarmo has a great function for

[wtr-general] Re: How I can do double click on a Cell

2010-07-28 Thread Adam Reed
Can you provide the error message with line number and the rest of the script? The error does not appear to be generated by the code that you posted. Thanks On Jul 28, 2:52 pm, carmen3lia eliaol...@gmail.com wrote: I am not able to do  double click on a Cell, this I have  

[wtr-general] Re: Firewatir attach method doesn't work properly

2010-07-26 Thread Adam Reed
I'm not sure why that happens with the parent window, but you should be able to attach back to the parent: ff = FireWatir::Firefox.attach(:title, Parent Window) Thanks, Adam On Jul 26, 6:07 am, Amit Kumar amit.e...@gmail.com wrote: Hi All! I'm using Firewatir 1.6.5 I want to test an web

[wtr-general] Re: Redo the last command

2010-07-13 Thread Adam Reed
My first approach would be to resolve why the application is not loading completely or call it a 'failure' and talk to you developers or network architects... Another approach would be to check to see if the last visible element on the page has loaded (whatever element is missing 100% of the time

[wtr-general] Re: Launching Report At End of Test

2010-07-06 Thread Adam Reed
Joe, Since the report is a basic .html file, you can open/view/launch it just like any other web content. You could launch a browser and supply the browser.goto command with the file name you defined earlier (from the tutorial): @report = @html.createReport('google_search', 'Google Search',

[wtr-general] Re: Automating omniture tags

2010-06-11 Thread Adam Reed
I also use an Excel data file to generate an array for testing, but my method for detection is a bit different: There are a couple of custom functions that you won't be able to see, but their names should let you know what their purpose is. def check_omni $browser.goto

[wtr-general] Re: Automating omniture tags

2010-06-10 Thread Adam Reed
Marlon, Can you tell me how the Omniture tags are being implemented if not in the html source? That would help me in considering an approach. My company uses Omniture but because the flags show up in the source, I just have to do pattern/text matching to verify values. Thanks, Adam On Jun 9,

[wtr-general] Re: Automating omniture tags

2010-06-10 Thread Adam Reed
#2 - is it possible the source you're looking at is only for a single frame/iframe, and not the section that contains the Omniture information? Adam On Jun 10, 1:36 pm, Adam Reed reed.a...@gmail.com wrote: Marlon, Can you tell me how the Omniture tags are being implemented if not in the html

[wtr-general] Re: click on link now working in watir

2010-06-09 Thread Adam Reed
Naresh, How does it 'not work'? Are you receiving an error? What _does_ it do when it is run? If you click on the link, the page should automatically go to URL (just as if you clicked a link manually). Your 'goto' statement is superfluous. Also, the semi-colons at the end of each line are

[wtr-general] Re: get value from password type text-field

2010-06-04 Thread Adam Reed
I just tried this on a login page, and @browser.text_field(:id, / pwd/).value gave me the correct/expected text. It appears that you are setting your password field id descriptor with a variable(?), is it possible you're accessing the wrong element? Make sure to try $ie.text_field(:name,

[wtr-general] Re: How to create a file and save it.

2010-06-03 Thread Adam Reed
I agree with Jason, and I would also recommend Everyday Scripting with Ruby/Marick - great book for scripters that know more about WATIR than they do about Ruby. http://pragprog.com/titles/bmsft/everyday-scripting-with-ruby On Jun 3, 8:30 am, Jason Trebilcock jason.trebilc...@gmail.com wrote:

[wtr-general] Re: How to create a file and save it.

2010-06-03 Thread Adam Reed
With respect, file manipulation is a basic feature of Ruby. WATIR is a testing library/tool that makes use of the basic built-in Ruby functionality. That is the distinction that is being made. In your case, you would need to design a way to locate the Order Id, temporarily assign that value to

[wtr-general] Re: text_filed validation - onchange alert window

2010-05-27 Thread Adam Reed
Exactly what I came to post; You're too fast Željko! On May 27, 3:04 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 27, 2010 at 7:14 PM, kashyap kashyap...@gmail.com wrote: I want to get a handle of that popup and verify the text on the alert window and hit on OK button.

[wtr-general] Re: canxth element

2010-05-06 Thread Adam Reed
I popped the OP's code into a simple html page and Željko's approach worked great. If the content in the third element might change (and not literally say something as friendly as Three), here's a more robust approach: MyCells = Array.new browser.cells.each do |cell| # If looking for a

[wtr-general] Re: canxth element

2010-05-06 Thread Adam Reed
I popped the OP's code into a simple html page and Željko's approach worked great. If the content in the third element might change (and not literally say something as friendly as Three), here's a more robust approach: MyCells = Array.new browser.cells.each do |cell| # If looking for a

[wtr-general] Re: time loop

2010-05-05 Thread Adam Reed
Rufus looks neat for building it in... If you're looking for something external and are using Windows, you can create a Scheduled Task and point it to the .rb file you'd like to run. If using RSpec, you can create a batch file (.bat) with your spec command line text and schedule that batch file

[wtr-general] OT: Is anyone else at Star East this week?

2010-04-27 Thread Adam Reed
Thought this might be a good opportunity to put faces with names if anyone else is attending the conference in Orlando! Adam -- 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

[wtr-general] Re: how ruby kill the powerpoint app

2010-04-20 Thread Adam Reed
What are you trying to accomplish? Rather, why does the Quit() function not work for you? You may have better luck asking in the Ruby group: http://groups.google.com/group/ruby-talk-google Thanks, Adam On Apr 19, 10:21 am, arihan sinha arihan.si...@googlemail.com wrote: Hi, Is there any way

[wtr-general] Re: watir exit code

2010-04-15 Thread Adam Reed
I can't say if the approach you're using is viable or not because I'm not clear on your intended goal, but if you're trying to get just the number after SystemExit try: $variable = $variable.split(SystemExit)[1] If I knew what test framework you were using, I could probably offer an easier way

[wtr-general] Re: Error in IRB: LoadError: no such file to load -- watir

2010-04-08 Thread Adam Reed
Not to further hammer the point here, but I've found that this message board has provided MANY helpful how-to's and JIRA bugs for WATIR. When an issue is discovered that has not been discussed previously, someone always asks the original poster to update the Wiki or log a JIRA bug. So, now that

[wtr-general] Re: ajax and unable to locate element

2010-04-08 Thread Adam Reed
If you'd like to be a little more exact in your approach, instead of using sleep you could wait_until the element exists. http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir On Apr 8, 11:45 am, Sal Jamil salem.m.ja...@gmail.com wrote: I added a sleep(5) after the fire_event and Watir was

[wtr-general] Re: Component focus issues on different computers

2010-04-06 Thread Adam Reed
You're selecting the first element in a drop down box? If not, can you please provide a little bit more info on exactly what you're interacting with? ie.select_list(:id, /Request_Salutation_I/).set First Value Name Thanks, Adam On Apr 5, 6:40 pm, Rats crapats...@yahoo.com.au wrote: On Apr 6,

[wtr-general] Re: Confused about array declaration failure (rspec, watir)

2010-03-03 Thread Adam Reed
of the class, use a class variable. If you want it to be the same throughout the program, use a global. If it should be per-instance, use an instance variable defined in some method of the class (#initialize, most likely). On Tue, Mar 2, 2010 at 16:11, Adam Reed reed.a...@gmail.com wrote

[wtr-general] Re: Confused about array declaration failure (rspec, watir)

2010-03-03 Thread Adam Reed
end end end On Mar 3, 9:12 am, Adam Reed reed.a...@gmail.com wrote: Thanks guys, that makes sense.  I'm definitely focusing too much on the new element (RSpec) and too little on the basic architecture! On Mar 3, 7:18 am, Ethan notet...@gmail.com wrote: You're defining

[wtr-general] Confused about array declaration failure (rspec, watir)

2010-03-02 Thread Adam Reed
This script works, but only if I explicitly define the array that I'm iterating over (][countryname, url]].each do, rather than @countries.each do). In a nutshell, the script goes to a static page, collects the links, visits each linked page and verifies an item - it has been significantly dumbed

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

2010-03-01 Thread Adam Reed
I'm at it again! Having some trouble completing an RSpec script with a pretty simple concept -- mostly having trouble with the hierarchy of it all. Basically, I have a single page with many links. Each link points the same type of template with a different title. The script stores these links

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

2010-02-25 Thread Adam Reed
it myself though) or just wander around in it's RDochttp://rspec.rubyforge.org/rspec/1.3.0/ Jarmo On Thu, Feb 25, 2010 at 5:28 PM, Adam Reed reed...com wrote: Jarmo, Thank you very much for your insightful reply.  You definitely addressed my weak point with Rspec right now which

[wtr-general] Re: Ruby array question

2010-02-25 Thread Adam Reed
Reposting my favorite approach from comp.lang.ruby google group (http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/ 7405cd6c99bea121#): class Array def indexes_of(obj) indexes = Array.new self.each_with_index {|s,i| indexes i if s === obj } return

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

2010-02-24 Thread Adam Reed
We have a new project starting up that I think presents a good opportunity to try out Rspec. I've gone through a lot of the documentation over the years and have begun to create the first couple of tests without test/unit. I know that Bret and others have used Rspec extensively, and I was

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

2010-02-24 Thread Adam Reed
to change behavior. I have not used it with any other scripts but this first venture into RSpec. On Feb 24, 10:01 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Hi, Comments are inline. On Wed, Feb 24, 2010 at 4:51 PM, Adam Reed reed.a...@gmail.com wrote: require 'spec' You do

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

2010-02-24 Thread Adam Reed
to change behavior. I have not used it with any other scripts but this first venture into RSpec. On Feb 24, 10:01 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Hi, Comments are inline. On Wed, Feb 24, 2010 at 4:51 PM, Adam Reed reed.a...@gmail.com wrote: require 'spec' You do