[wtr-general] watir, watir-webdriver, watir-classic: history and current state?

2013-01-30 Thread jw
Hey gang,
I developed a very robust framework for a company in 2009-2011 using watir 
and converted to watir-webdriver in late 2011- early 2012.  During the 
conversion I had to make many horrible compromises (inserting retry 
statements, wait statements, etc.), and watir-webdriver still gave false 
negatives very consistently.  It worked so poorly that I no longer trusted 
the failed test results at all.  The app was a normal, relatively small web 
app, nothing fancy.

In March 2012 I quit and have not looked at watir until this week.  I 
talked with someone today who had similar bad experiences with 
watir-webdriver and said that it has made great strides in the past 12 
months.  So my questions are (forgive me if this has been covered 
elsewhere):

Is it true that watir-webdriver has improved significantly in the past 12 
months?  
Watir-webdriver was considered watir 2.0, so when I saw watir-classic, it 
made me think that maybe it had been created in response to negative 
feedback on watir-webdriver...?  Now it sounds like watir-classic is just 
an update to watir that makes the syntax more similar to watir-webdriver...?

I am curious how anyone else feels about watir-webdriver 12 months ago and 
watir-webdriver now and if anyone knows the true motivation for 
watir-classic.  I am not asking for a long reply, just quick thoughts...
thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: tightness of coupling between watir and watir-webdriver?

2012-01-17 Thread jw
Ah, I read it too fast.  Thanks Zeljko.

On Jan 17, 3:54 am, Željko Filipin zeljko.fili...@gmail.com wrote:
 On Mon, Jan 16, 2012 at 6:19 PM, jw joshuawal...@gmail.com wrote:
  Zeljko, thanks for taking the time to organize the information around
  Watir.  I saw one bullet that I have a question about, which was
  Watir-webdriver is the only driver, and it can drive all popular
  browsers on all popular platforms.  From what I understand, WW does
  not drive Safari on OSX, true?  I would put that exception in there
  unless it's no longer true (which would be fantastic).

 Athttps://github.com/zeljkofilipin/watirbook/blob/master/about_extended.mdI
 wrote this:

 What would I like to see happening in the (near) future, regarding Watir
 code, you ask? In no particular order: (...) Watir-webdriver is the only
 driver, and it can drive all popular browsers on all popular platforms.

 So, it is not true yet.

 Željko

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: tightness of coupling between watir and watir-webdriver?

2012-01-16 Thread jw
Thanks Chuck.  What you said is not surprising after reading the
code.  What is surprising is that WW implements the whole Watir API
(with some differences as we've all seen).   I think WW gem requires
common-watir and I thought Watir, but if you say it does not then I'm
sure you're right.  I thought WW was a thin layer between Watir and
Selenium-Webdriver, reusing the API code from watir and the driver
code from Sel-W so that all that API code didn't have to be
rewritten.  What you've said makes more sense, just surprising.  Thank
you for your reply.

Zeljko, thanks for taking the time to organize the information around
Watir.  I saw one bullet that I have a question about, which was
Watir-webdriver is the only driver, and it can drive all popular
browsers on all popular platforms.  From what I understand, WW does
not drive Safari on OSX, true?  I would put that exception in there
unless it's no longer true (which would be fantastic).



On Jan 14, 3:12 am, Željko Filipin zeljko.fili...@gmail.com wrote:
 On Sat, Jan 14, 2012 at 12:26 AM, Chuck van der Linden sqa...@gmail.com
 wrote:

  I've not had a chance to read it yet (it's on my list) but I think
  Zeljko's book on Watir contains a bit of history about how the tool
  developed.

 https://github.com/zeljkofilipin/watirbook/blob/master/about.mdhttps://github.com/zeljkofilipin/watirbook/blob/master/about_extended.md

 Željko
 --
 watir.com/book - author

-- 
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: Watir 3.0.rc1 Released

2012-01-13 Thread jw
So to be clear, the change to (for example) Button#text would not
affect a script that uses watir-webdriver, correct?  Is there any
noticeable change to watir-webdriver users?

Thanks for keeping people writing automation at their job instead of
testing manually!


On Jan 13, 1:32 am, Jarmo jarm...@gmail.com wrote:
 Hello everyone!

 I'm happy to announce that Watir isn't dead at all, since yet another
 version of Watir has been just released - 3.0.rc1.

 Its biggest goal is to conform even better with WatirSpec making it more
 compliant with Watir-WebDriver.

 Changelog:
 * Button#text returns value if exists instead of text
 * Browser#goto prepends url automatically with http:// if scheme is missing
 * Browser#element(s)_by_(xpath/css) are now private methods - use
 #element(:css = ...) and #element(:xpath = ...) instead
 * Browser#label supports searching by :for attribute
 * Browser#options method for searching option elements
 * Browser#body, #thead, #tfoot, #tbody, #frameset and #fieldset added
 * Browser#window and Browser#windows added implementing window switching
 API (https://github.com/jarib/watirspec/blob/master/window_switching_spec.rb
 )
 * Element#present? returns false if exception is thrown by #exists? or
 #visible?
 * Element#style returns CSS text instead of OLE object
 * Element#text returns an empty string for non-visible elements
 * Element#parent returns correct instance of Element class (e.g. Div
 instead of Element)
 * Element#focus focuses document before focusing on the element
 * Element#right_click and Element#double_click added
 * Element#to_subtype added which returns specific instance of
 Watir::Element subclass
 * Element#send_keys added
 * Element#eql? as an alias for Element#== added
 * Element#tag_name added
 * ElementCollection#[] method supports negative indexes like regular Arrays
 * ElementCollection#[] returns always an object, even if the index is out
 of bounds
 * FileField#set and Image#save uses correct Windows file path (e.g. convert
 \-es into /-es)
 * FileField#set raises Errno::ENOENT instead of WatirException if file
 doesn't exist
 * FileField#value= as an alias for FileField#set added
 * Font#color, #face and #size added
 * Form#submit triggers onSubmit event and doesn't submit the form if
 event's callback returns false
 * Frame#execute_script added
 * Image#file_size, #height and #width return integer instead of a string
 * Image#save blocking fixed
 * Meta#content and #http_equiv added
 * Option code rewritten, causing changes in its API
 * SelectList code rewritten, causing changes in its API
 * SelectList#(selected_)options returns now Options collection instead of
 an array of strings
 * Table and its subelements code rewritten, causing changes in its API
 * Table#strings and #hashes added
 * TextField#label added
 * searching elements will find only correct types - e.g. using Browser#div
 returns only DIV element even if all other provided selectors match
 * all selectors and tag of the element needs to match even if searching by
 :id
 * supporting html5 data-* attributes by using :data_* for locating and
 #data_* for retrieving attribute values
 * many other internal changes

 Please try it out before final release of 3.0 by executing:
 gem install watir --pre

 With Best Regards,
 Jarmo Pertman

-- 
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] tightness of coupling between watir and watir-webdriver?

2012-01-13 Thread jw
This question was spawned when Jarmo recently announced watir 3.0.  I
was trying to figure out if the changes he listed would affect my
watir-webdriver scripts, and after looking at some code I'm guessing
not.

When I've installed watir-webdriver it seems watir is a prereq.  But I
noticed that (for example) Watir::Element is defined in both watir and
watir-webdriver.  The underlying object (the DOM element) in watir is
found using watir's native tools.  It looks like the underlying object
in watir-webdriver is found using selenium-webdriver.  So my question
is what does watir add (why is the gem necessary) if you are using
watir-webdriver?  I'm not looking for a long technical discussion,
just a quick conceptual how do they fit together kind of answer.
Thanks to anyone who can provide clarity...

-- 
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] waiting using implicit_wait with watir-webdriver

2011-10-04 Thread jw
After searching for a long time, Alister Scott finally clued me in
that watir-webdriver does in fact include a method that I thought was
only available in selenium (or selenium webdriver).  Instead of doing
a wait_until_present and then doing a click, you can just (globally)
do a

myBrowser.driver.manage.timeouts.implicit_wait=3

so that each access of a DOM element (click, set, text, etc.) will try
for X seconds before failing with
Watir::Exception::UnknownObjectException: unable to locate element

This is huge for me.  Coming from watir where waiting was not
necessary, I  (instead of doing tons of explicit waits) had basically
wrapped all calls with rescue/sleep statements that tried 3 times
before bubbling up the exception.

I'm just posting this because I didn't find documentation for this
anywhere and I'd expect many people to have a similar need as I had.

-- 
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: Safari Watir / Webdriver - reasons for choosing watir or selenium...

2011-09-30 Thread jw
I just found out that with selenium webdriver you can create/increase
the implicit wait.  I think this could significantly reduce the manual
waiting and help me with all my wrapped click/set/etc. methods...

http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html

On Sep 27, 6:09 pm, jw joshuawal...@gmail.com wrote:
 I have recently switched from a very successful (albeit IE 6-8 only)
 Watir suite to watir-webdriver (WW).  It has been very painful and
 disillusioning but i'm getting close to back where I was 3 weeks
 ago.

 Of course my reason was to be able to test all the browsers under
 (almost) the same code with the expectation that there would be a few
 places like ULing/DLing files that I may have to use some case
 statements on OS or browser flavor.  I had been on ruby 1.8.6 and had
 to install 1.8.7 which involved getting rvm or pik (maybe wasn't
 necessary but seemed the easiest path).  installing WW and getting to
 bring up a window was pretty simple, but what I meant by
 disillusioning was 1-finding out it didn't support Safari, which was
 apparently a bad assumption (clearly I thought it a safe one), and 2-
 having to account for WW's seeming inability to discern when the
 browser was loaded.  This was one of my favorite things about Watir
 was it's (in my experience) reliable reliance on IE to determine that
 the page was fully loaded.  No more wait statements!  Well, with WW
 you're going to have to wrap your calls with wait methods, and if you
 wrote a lot of bare click/set/select statments you'll be doing a lot
 of wrapping (or overriding of lib methods to include wrapping in wait
 stmts).  I don't regret moving to WW, but it did suck, and it does
 frustrate me about the wait, and it's way, WAY slower than watir
 (hopefully some refactoring will help this).

 On Aug 4, 12:40 pm, qalady lau...@protopc.com wrote:

  Thank you very much for the feedback.

  So, to summarize what I think I am hearing:

  1. Webdriver does not support Safari
  2. Webdriver does support mobile browser testing - but just barely
  (as .click is not even working well at this point)
  3. WatirSafari works but has been out of development for at least a
  year. It's not really clear on where
  or how it will start to break down.

  I did look up web browser statistics on W3C site: 
  (http://www.w3schools.com/browsers/browsers_stats.asp)
  and it looks like Safari is only around 3% of all browser users which
  is just slightly above Opera. I was surprised the usage stats were so
  low.

  So...now what...? I've spent the last few days thinking that as much
  as I didn't want to switch to Selenium, that switching just might be
  the responsible thing to do for my company. I've been reading/
  researching more about Selenium and how to get started. I have some
  useful resources now...but I am worried about the ramp up time. I am
  only considering Selenium RC (not the ide).  With Watir, I can
  continue writing scripts today. With Selenium, it will be slow going
  to set up the environment, and learning how to structure the test data
  (page objects), read all the preliminary material and then sheepishly
  start to write my first test scripts (I would work in Java). It seems
  painful, but if in the end, it's going to be a better investment,
  better go ahead and jump in now, right?

  Can anyone tell me something that would stop me from pursuing Selenium
  and keep me feeling confident about having chosen Watir? (Please!) Is
  there anything that Watir can do that Selenium can't? At this point,
  even though I'm a personal fan of Watir and adore (and depend) on the
  community that comes with it...I'm feeling like Watir is starting to
  fall behind and Selenium is starting to become the more dominant tool
  choice. As much as I personally want to select Watir as the tool of
  choice for my company...it seems to not hold up against Selenium when
  I discuss this with management. (Most other groups within the company
  are using some combination of tools that include Selenium)

  Hoping to hear a reason to stay with Watir for my work project,
  Lauren



-- 
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] watir-webdriver timing out, ending run of Suite (Test::Unit) instead of simply causing test failure

2011-09-26 Thread jw
ruby 1.8.7 (352)
test-unit (2.3.0)
watir (2.0.1)
watir-webdriver (0.3.3)
IE9/probably others

I don't know if other people have seen this, but I'm occasionally
getting stacks that look like:

C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/timeout.rb:64:in
`rbuf_fill': execution expired (Timeout::Error)
from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/
protocol.rb:134:in `rbuf_fill'
from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/
protocol.rb:116:in `readuntil'
...
from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/gems/1.8/
gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/common/element.rb:
34:in `click'
from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/gems/1.8/
gems/watir-webdriver-0.3.3/lib/watir-webdriver/elements/element.rb:
67:in `click'
from ./watirutilbuttonclicks.rb:120:in `click'
...

while running my tests, and instead of just making the current test
fail, the whole test suite is stopping execution.  It seems
Timeout::Error is a SignalException and is a pass-through error that
Test::Unit will re-raise which will cause the whole test Suite to stop
execution.  I have added Timeout::Error to the pass-through list by
adding this line to my ClassExtensions.rb (required lastly in order to
add or override some Watir methods).

Test::Unit::ErrorHandler::NOT_PASS_THROUGH_EXCEPTIONS.push(Timeout::Error)

This seems to have fixed my issue in the most elegant way possible
(test still fails, but suite continues execution) but I couldn't find
documentation on NOT_PASS_THROUGH_EXCEPTIONS anywhere, so if this
isn't a good idea, please let me know.

-- 
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: undefined method click_no_wait

2011-09-23 Thread jw
That's probably what I would do as well.  As a sidenote, if this is
happening on IE, that doesn't mean it will happen in FF.  I just had a
popup in FF and (very surprisingly) it seemed the test was still
setting text_fields and clicking buttons in the browser while the
popup was sitting on top of the browser.   I thought it was a modal
popup but maybe it wasn't... very weird.  In cases of DLing/ULing
using watir-webdriver i've started writing a lot of case statements
switching on OS or browser flavor.  Fun.

On Sep 19, 12:05 am, Ivan Chung ivanchun...@gmail.com wrote:
 Thanks for the reply. At the end i have gave up thisclick_no_waitand
 direct use the autoit = WIN32OLE.new('AutoItX3.Control') to send the
 {enter} key for the js popup

-- 
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: firefox (on windows) DL path in browser prefs has issues

2011-09-21 Thread jw
You're an OSX user, true? So this is happening there as well?

On Sep 17, 5:34 am, Alister Scott alister.sc...@gmail.com wrote:
 Thanks SO much for this.
 I was experiencing this EXACT same problem yesterday and it was driving me
 nuts!
 With this patch, will it also work with a newer version of Firefox?

-- 
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: firefox (on windows) DL path in browser prefs has issues

2011-09-21 Thread jw
Successfully tested the above patch on FF6.0.2 on XP.  I saw the
'double escaping' patch you/he recommended in your change request but
I'm sticking to this for the time being... works on my machines :)

On Sep 21, 11:54 am, jw joshuawal...@gmail.com wrote:
 You're an OSX user, true? So this is happening there as well?

 On Sep 17, 5:34 am, Alister Scott alister.sc...@gmail.com wrote:

  Thanks SO much for this.
  I was experiencing this EXACT same problem yesterday and it was driving me
  nuts!
  With this patch, will it also work with a newer version of Firefox?



-- 
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: Watir-Webdriver IE issue (UnexpectedJavascriptError: Unable to find element with xpath)

2011-09-16 Thread jw
true.  I just read the bottom of your post that said it was working
for FF.  that sounds like a weird one.  only thing i could suggest
would be to try to access it a different way (using id, text, anything
else) or do something like
lists=b.select_lists
and iterate through the lists and see what's there.

On Sep 16, 1:19 pm, Mike michaelszor...@gmail.com wrote:
 hey jw,
 I am running this in irb... sleep/wait shouldn't be an issue there, right?

-- 
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] firefox (on windows) DL path in browser prefs has issues

2011-09-16 Thread jw
ruby 187
selenium-webdriver (2.6.0)
watir (2.0.1)
watir-webdriver (0.3.3)

It looks like FF (3.6.6) has some issues with the DL path setting:
browserProfile['browser.download.dir'] = C:\my\new\dir

1) it seems the string you pass must use backslashes and must contain
the drive letter

2) this example path will not work because webdriver first makes a
file called user.js which has a line like:
user_pref(browser.download.dir, C:\my\new\dir);

but when FF starts up it creates prefs.js which will have a line like:
user_pref(browser.download.dir, C:\\my\new\\dir);

where the \ before the 'n' is lost.  It does the same thing for '\r'
so I put in a hack in my classExtensions file that looks like:

module Selenium
  module WebDriver
module Firefox
  class Profile
def write_prefs(prefs, path)
  File.open(path, w) { |file|
prefs.each do |key, value|
  if (key['download'] and value.kind_of?(String))
value.gsub!(/\\n/, '\\n')
value.gsub!(/\\r/, '\\r')
  end

  file.puts %{user_pref(#{key}, #{value});}
end
  }
  puts path
end
  end
end
  end
end

-- 
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: Watir-Webdriver IE issue (UnexpectedJavascriptError: Unable to find element with xpath)

2011-09-15 Thread jw
Try (as debugging, not as solution) putting a sleep right before the 
select.  Will let you know if it's a timing issue or an actual 'not found' 
issue.  You may have to introduce waiting.  This is an area that concerns me 
: (

-- 
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] watir-webdriver and ie9 - downloading a file stops processing

2011-09-15 Thread jw
Using watir and ie8 I was able to DL files from my app no problem.  Now 
using
ie9.0.8112
ruby 1.8.7 p352
selenium-webdriver (2.5.0)
watir (2.0.1)
watir-webdriver (0.3.3)

The click_no_wait method is no longer an option in watir-webdriver.  
IE9's DLs appear in-window in a gold band near the bottom of the IE window 
(see 
http://www.autoitscript.com/forum/topic/127941-handling-ie9-file-download-activex-prompts/)
My solution was to click download, then use AutoIt to save the file.  The 
problem is when I click the link to DL the file, processing of the ruby 
script stops.  This happens in ie9 mode, UNLESS the developer toolbar is 
open or has been opened/closed in the ie9 session previous to the download.  
Very strange.  The script times out and the whole ruby process (using 
Test::Unit) bombs out (instead of Test::Unit catching the timeout, which is 
unfortunate):

C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/timeout.rb:64:in 
`rbuf_fill': execution expired (Timeout::Error)
from 
C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/protocol.rb:134:in 
`rbuf_fill'
from 
C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/protocol.rb:116:in 
`readuntil'

On that note, it is intentional that Test::Unit stops processing Tests when 
it gets this specific exception?
Any help is appreciated...

-- 
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: watir-webdriver and ie9 - downloading a file stops processing

2011-09-15 Thread jw
I guess my temporary hack is to very briefly:

#HACK for ie9: open and close dev toolbar real quick
if ($envHash[:browserFlavor]['ie9'])
  send_keys(:f12)
  sleep 0.1
  send_keys(:f12)
end

-- 
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: HP acquires the Watir project, announces Wativ

2010-04-01 Thread jw
good one Alister!  I usually get taken on this day but everybody at my
office said to expect pranks : )

On Apr 1, 5:23 am, Don Taylor don.tay...@jmedia.com.au wrote:
 it would be a pity if all this turned out to be the work of a juvenile few
 who treat Watir as their plaything.

 just glad I've found TestWise developed by someone who is committed to
 providing a tool for test automation.

 Don

   _  

 From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
 On Behalf Of Željko Filipin
 Sent: Thursday, 1 April 2010 9:05 PM
 To: watir-general@googlegroups.com; watir
 Subject: Re: [wtr-general] HP acquires the Watir project, announces Wativ

 Alister and I are flying to HP headquarters (Palo Alto, Calif.) as I write
 this (from the plane). We have heard that Watir users are gathering in front
 of the headquarters. There are some rumors about them having signs and
 shouting stuff. I hope we will manage to record a podcast with a few of the
 Watir users and hear what they think.

 Željko

 --
 Before posting, please readhttp://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
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

To unsubscribe, reply using remove me as the subject.


[wtr-general] Re: Drop down menu

2010-03-19 Thread jw
so if you have ahold of the SelectList object using
$b.select_list(:index, 2), can you make if flash?  if so, can you view
the values using
$b.select_list(:index, 2).options

The Watir API says options is a method but in my installation it
doesn't seem to be implemented.  Here is the code from the API, which
works for me.  I also added option_values which shows the value of
each element in the SelectList if you do
$b.select_list(:index, 2).option_values

Maybe your SelectList has value options instead of text options.  in
that case you'd have to use
$b.select_list(:index, 2).select_value(Test)

module Watir
  class SelectList

def selected_option
  assert_exists
  returnArray = []
  @container.log There are #...@o.length} items
  @o.each do |thisItem|
if thisItem.selected
  @container.log Item (#{thisItem.text}) is selected
  returnArray  thisItem.text
end
  end
  return returnArray
end

def options
  assert_exists
  @container.log There are #...@o.length} items
  returnArray = []
  @o.each { |thisItem| returnArray  thisItem.text }
  return returnArray
end

def option_values
  assert_exists
  @container.log There are #...@o.length} items
  returnArray = []
  @o.each { |thisItem| returnArray  thisItem.value }
  return returnArray
end

  end #end class SelectList
end #end module Watir


You said it generates a table, you don't mean an actual html Table,
right? Just the list of options in the SelectList?


Something else you could try would be to create an option by saying
o=$b.select_list(:index, 2).option(:text, Test)

then maybe you could do the
$b.select_list(:index, 2).select(Test)


Don't know if any of this will help, but maybe it'll get you closer...



On Mar 18, 3:51 pm, tester86 sagar.am...@gmail.com wrote:
 I have been testing this part of my script in IRB, I also triggered
 two fire_event onmousedown then onmouseup. Also tried onmousedown
 sleep 1 then onmouseup, tried and tested all the possbile combinations
 and methods.

 When onmousedown is triggered in the table it generated the drop down
 list -- but it shows up as blank then if you go and select a value via

 $b.select_list(:index, 2).select(Test)
 $b.select_list(:index, 2).set(Test

 it cannot find the element.

-- 
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

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[wtr-general] Re: Drop down menu

2010-03-18 Thread jw
you may have to fire more than one mouse event.  i once had to fire an
onmousedown, wait 1 sec, then fire onclick (or something like that, i
don't quite remember).  try doing it interactively with irb instead of
writing the test and running over and over.  playing with it
interactively sometimes makes it much faster to develop a solution to
an unusual situation.

On Mar 17, 9:30 am, tester86 sagar.am...@gmail.com wrote:
 Hi
 (
 I did try text_field before but it does not work, after I set focus
 and execute text_field(:index, 2).set(Test) error stating index 2
 has been disabled. What I am doing: I set the focus in the drop down,
 then set onblur(if i do $b.select_list(:value, Test).click this
 clicks on the default value in the drop down) however the list is
 invisible checked using firebug. I need to somehow click on the drop
 down again in order to display the list. I have tried various
 combinations but nothing working. I have triggered fire_events.

 Thanks

 On Mar 16, 10:55 pm, Mrunal mrunal.gor...@gmail.com wrote:

  Hi

  In case when there is drop down arrow, the elements are set using
  text_field sometimes.
  Please try this option also.

  e.g. $ie.text_field(:name,'').set('')

  tester86 wrote:
   Hi

   I did fire a javascript event that will set the focus in the drop down
   list:

   $b.table(:index, 1)[2][6].fire_event(onmousedown)

   When the above line is executed it does not display the drop but it is
   focused. When I do either of the following:

    $b.select_list(:index, 2).select(Test)
    $b.select_list(:index, 2).set(Test)

   It does not select the link. I have to somehow click on the drop down
   arrow again in order to populate the drop down list. This is the same
   behavior when selecting a value in the drop down list manually.

   Thanks

   On Mar 15, 5:29 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi!

   You have a typo in your select statement:

   $b.select_list(:index, 2).select_list(Test)

   should be:

   $b.select_list(:index, 2).select(Test)  (although, I think
   $b.select_list(:index, 2).set(Test) should work as well)

   Have you tried firing your javascript to put focus on the field just
   before attempting the select statement?

   Hope this helps!

   -Tiffany

   On Mar 15, 2:43 pm, tester86 sagar.am...@gmail.com wrote:

   I need to click on a drop down.  I have a script that will set the
   focus in the drop down list then when I go to select the value it does
   not select the list. Manually: When I click in the drop down field it
   gets activated then when I click on the drop down arrow it will
   display the list.

   Interaction:

   When I click in the cell it sets the focus, then I have to click on
   the drop down arrow in order to see the list of options. If I do:

   $b.table(:index, 1)[2][6].fire_event(onmousedown)

   The above will set the focus in the field that contains the drop down.
   Manually I have click on the drop down in order to see the list

   If I do:

   $b.select_list(:index, 2).select_list(Test)

   It does not click on Test. Is there any way I can click on the drop
   down in order to see the list..

-- 
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: Help required to access src element in the following code.

2010-02-09 Thread jw
ok i get it.  it's an embed element as opposed to a button or link,
etc.
if you have an IE object you can use the html method to get the html
text.  not great but might do the trick

On Feb 9, 6:11 am, ashwin mahesh smashwi...@gmail.com wrote:
 There is a chart which shows data in four formats namely 2D pie chart,
 3D pie chart, bar chart and tabular table. So to change from one type
 of format to another I need to click on a image. I want to verify
 whether the chart shown is according to the image on which I clicked.
 When I click on image the SRC attribute changes from src=/bf/Charts/
 Pie2D.swf to src=/bf/Charts/Pie3D.swf.( when I click on image for 3D
 pie chart ).  I need to verify this change in the SRC attribute.
   But src is the attribute for embed element. So can you tell me how
 to use this src for verification.

 On Feb 9, 4:44 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:

  On Tue, Feb 9, 2010 at 6:23 AM, ashwin mahesh smashwi...@gmail.com wrote:
   Any idea how to overcome this problem.

  No, because you did not provide answers to my questions.

  Željko
  --
  watir.com - community manager
  pledgie.com/campaigns/2982 - donate to Watir
  watirpodcast.com - host
  testingpodcast.com - podcasts on software testing. all of them

-- 
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: Help with Modal Dialog boxes !!!!

2010-02-09 Thread jw
By having the access right do you mean access as in permissions or
just you're not accessing it correctly?

I have been using enabled_popup and WinClicker to interact with
javascript modal dialogs with decent success.
The button I had to click was labelled Open but the button name I
had to pass to WinClicker was Open

I don't know if this is a convention or if it's just in my app.  I
found this out by

ie = attach (...)
# manually click the button to create the modal
hwnd = ie.enabled_popup(3)
w = WinClicker.new
w.get_static_text_hwnd(hwnd)
= [Look in:, , File name:, Files of type:]
w.clickWindowsButton_hwnd(hwnd, 'Open')
= false
w.clickWindowsButton_hwnd(hwnd, 'Open')
= true


if you do a
puts w.methods
you'll see the methods like
get_static_text_hwnd
get_win_title
getStaticText
getStaticText_hWnd
get_static_text_hwnd
that you can try using to figure out what the button is actually
called.

hopefully i'm not just telling you stuff you already know/have
tried...



On Feb 9, 6:25 am, Rohan Premvallabh Ojha rohan.o...@bsil.com wrote:
 Hi,

 Thanks for the information/URL but I am still unable to move ahead with the 
 modal dialogs.

 What I have tried so far is:

 Method I:

 Used all the methods in the watir.rb file for Class ModalDialog but they 
 don't seem to work with Ruby ver 1.8.6 or 1.8.5 for that matter.
 So I had Ruby 1.8.2 installed in another machine but that doesn't seem to 
 support click_no_wait.

 mod= ModalDialog.new
 mod.find_modal_from_window

 Method II :

 Tried using the modal dialog example from the Wiki page

  modal = ie.modal_dialog(:title,'Modal Dialog - Webpage Dialog')
  puts modal.title()
  modal.wait
  puts modal.button(:index,1)

 Method III :

 Tried finding the connect_unknown method in Win32Ole.

 We encounter NoMethodError for connect_unknown in the locate method for the 
 class ModalDialog. However win32ole doesn't have any method by such name.The 
 method present is connect which takes argument as either OLE program id or 
 class id or moniker.

 Method IV :

 Winclicker

 Tried using the winclicker class of watir to handle the modal dialog.

 w=WinClicker.new
 q1=w.getWindowHandle(/Webpage Dialog/)
 puts q1                                               (This returns to me the 
 hwnD for the modal dialog box)
 puts w.getWindowTitle(q1)                      (This returns to me the title 
 of the modal dialog window)

 However if we try to use :
 w.clickWindowsButton_hwnd(q1,'Run')                 (Run is the caption of 
 the button that I need to click)

 The system returns me FALSE so even though we have control of the modal 
 dialog we still don't have the access right to the window.

 Also it seems to me that as we have moved ahead with newer versions of Ruby 
 and Watir we seemed to have gone backwards with respect to pop-ups (modal or 
 non-modal)

 So can you guys please look into it so that we can get going with not just  
 this but with other such problems in Watir

 
 From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
 On Behalf Of Željko Filipin
 Sent: Monday, February 08, 2010 6:07 PM
 To: watir-general@googlegroups.com
 Subject: Re: [wtr-general] Help with Modal Dialog boxes 

 On Mon, Feb 8, 2010 at 7:03 AM, Rohan Ojha 
 rohan.o...@bsil.commailto:rohan.o...@bsil.com wrote:
  Has anybody come across some method with which we can work on a modal 
  dialog window.

 Thanks for the screen shot, it always helps.

 Did you read this?

 http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/display/WTR/Modal+Dialogshttp://wiki.openqa.org/display/WTR/New+Browser+Windows

 Željko
 --
 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 
 athttp://groups.google.com/group/watir-general

-- 
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] WatirGrid (distributed watir) anyone?

2010-02-04 Thread jw
It seems clear (due to the existence of seleniumGrid) that there's a
need for a standard client/server architecture to cut down on test
runtime, but I never heard about anyone discussing this.  WatirGrid
has existed for several months and seems to address this pretty well.
It's not fully fleshed out, but I ran a solid proof of concept today
and setup time was minimal.
I plan on using watir for an extensive regression suite which would
take days to run on a single machine and this should address my need
pretty well, the beauty of which is that the logging/results will be
on the server in a single place.  I was sortof planning on writing
some kind of distribution myself before I saw this.
Is there something else out there (for Watir) that already does this
that I don't know about?

-- 
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: Xpath cell

2010-01-28 Thread jw
I think xpath is generally considered a last resort by most people.
To me it seems very brittle.  If the layout of your page changes a lot
of your code will break.  Using IDs to locate elements is usually your
best choice I believe.


On Jan 27, 12:07 pm, Bharath bkalt...@gmail.com wrote:
 Željko,
 Thank you very much.
 $browser.cell(:class='rptName').text worked for me.
 but i when I have time i will try to work with xpath.

 Thanks again
 BK

 On Wed, Jan 27, 2010 at 11:31 AM, Željko Filipin 

 zeljko.fili...@wa-research.ch wrote:
  On Wed, Jan 27, 2010 at 5:25 PM, Bharath bkalt...@gmail.com wrote:
   $browser.cell(:xpath, //t...@class='rptName']/)
   Watir::Exception::UnknownObjectException: Unable to locate element, using
  :xpath, //t...@class='rptName']

  XPath is black magic to me. I rarely use it and I always have to look up
  the syntax, and I do not have the time at the moment.

  Try this:

  browser.cell(:class = rptName).text

  If the cell is child of any element that could be uniquely identified, you
  could use something like this:

  browser.element(how = what).cell(:class = rptName).text

  Željko

   --
  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

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Watir - Going down a to read the next element and perform click action on a button

2010-01-13 Thread jw
so it is working (clicking an element) just not the right one?
If the page is static you could try using the index of the element
ie.link(:index, 2)
but this is usually not the best way, especially if your elements have
ids

On Jan 12, 9:27 am, tester86 sagar.am...@gmail.com wrote:
 HI

 With the app there is an id association but sproutcore considers
 everything as a link and you have to use onmousedown and onmouseup in
 order to select a checkbox. When I use that with watir it does not
 click on the second link it just unchecks the first link. If you have
 any ideas for suggestions that would be great.

 Thanks

 On Jan 11, 3:00 pm, Charley Baker charley.ba...@gmail.com wrote:

  Watir supports anything that's part of the dom. I don't know sproutcore, but
  any JS libraries are fine. ID association is great and if you can enforce
  unique ids, it'll make testing easier.

  -c

  On Mon, Jan 11, 2010 at 1:51 PM, tester86 sagar.am...@gmail.com wrote:
   Hi

   I maybe starting another thread but thought I'd post my message on
   here. How does Watir support Javascript (sproutcore). For example if I
   wanted to click on a checkbox sproutcore considers it as a link which
   has an ID assoication.

   --
   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-Hide quoted text -

  - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: No Matching Window Exception.

2010-01-13 Thread jw
it may be the difference between
http://www.google.com;
and
http://www.google.com/;

if you're typing it by hand each time it's easy to miss that /

On Jan 13, 5:47 am, Chandu80 chandu.she...@gmail.com wrote:
 Hi,
 When I type in the lines of code as you mentioned,I am able to see the
 correct url.
 Today I even the code ran without error i.e I am able to attach to the
 existing window successfully.However i haven't touched the code or
 modified it,so what could be the reason for the change in the results?

 Thanks  Regards
 Chandrika

 On Jan 12, 5:04 pm, Krishna saradka krishna.sara...@gmail.com wrote:

  Try printing the URL of the loaded page, just to confirm that the page still
  has the same URL and is not changed on page load. You may print the URL soon
  after the page load to confirm this.

  urlNew  = $ie.url
  puts  URL confirmation : +urlNew
  $ie = Watir::IE.attach(:url, urlNew)

  add them before the code
  $ie = Watir::IE.attach(:url, test_site)

  Thanks  Regards,
  KK

  On Tue, Jan 12, 2010 at 3:50 PM, Chandu80 chandu.she...@gmail.com wrote:
   Hi,
   I have checked and found the browser url ashttp://www.google.com.

   Regards
   Chandrika

   On Jan 11, 7:49 pm, Željko Filipin zeljko.fili...@wa-research.ch
   wrote:
Did you check that browser url is google.com? When I navigate to
   google.com,
it actually opens google.hr (because I am in Croatia)?

Željko

   --
   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
-- 
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: Not able to edit Text Field

2010-01-13 Thread jw

 even I am able to get the text
 ie.table(:id, ivr_template:params).div(:index,1).text = lokesh or
 ie.table(:id, ivr_template:params)[2][2].text



when you do this
ie.table(:id, ivr_template:params).div(:index,1).text

it's just resolving to a string.  you have to get hold of the
text_field object like
ie.table(:id, ivr_template:params).div(:index,1).text_field(:index,
1).set('lokesh')

try playing with it in irb, there you can interact with your page and
see how the page responds and what's the best way of accessing the
page element
-- 
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: Verify table sort order

2010-01-13 Thread jw
elsif(is_time = self.parseTime(last_value))

should probably be

elsif(is_time == self.parseTime(last_value))

break the problem up, write more helper methods, it's too big to debug

On Jan 12, 3:24 am, Hamid hamid.dela...@gmail.com wrote:
 I wonder if anyone can help me to change the cod so it will also sort
 a empty table (nil)?
 BR/Hamid

  # Verify the sort order of a table.
   # * first_row: The number if the first row in the table
   # * last_row: The number if the last row in the table
   # * column: The column number to verify order in.
   # * order: The order to check (asc, desc)
   def verifyTableSortOrder(first_row, last_row, column, order)

     current_row = first_row
     last_value = nil

     # Get first value and put into last_value
     while(current_row = last_row  (!last_value ||
 last_value=='NA'))
       last_value = self.getValueInTable(current_row, column)
       current_row += 1
     end

     if(last_value[/http:/]) # URL(images) should be sorted first
       last_value = ' ' # First char in ascii sort order
     elsif(is_time = self.parseTime(last_value))
       last_value = is_time
     elsif(numeric?(last_value))
       last_value = last_value.to_f
     else
       last_value = last_value.downcase
     end

     success = true
     while(current_row = last_row)
       current_value = self.getValueInTable(current_row, column, 1)

       if(!current_value || current_value == 'NA')
         # No comparison
         current_row += 1
         next
       elsif(current_value[/http:/]) # URL(images) should be sorted
 first
         # URL comparison
         current_value = ' ' # First char in ascii sort order
       elsif(is_time)
         # Time comparison
         current_value = self.parseTime(current_value)
       elsif(numeric?(current_value)  last_value.class==Float)
         # Numeric comparison
         current_value = current_value.to_f
       else
         # String comparison
         current_value = current_value.downcase()
         last_value = last_value.to_s
       end

       if(order[/asc/i])
         unless(current_value=last_value)
           self.failure(Column #{column} was not sorted Ascending. #
 {current_value}  #{last_value})
           success = false
         end
       elsif(order[/desc/i])
         unless(current_value=last_value)
           self.failure(Column #{column} was not sorted Descending. #
 {current_value}  #{last_value})
           success = false
         end
       end
       last_value = current_value
       current_row += 1
     end
     if(success)
       self.success(Column #{column} was sorted #{order})
     end
   end
-- 
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: waitr - problem with autoit WinActivate - fails at random

2010-01-13 Thread jw
Did you try all the solutions on
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups

solution #3 (after some customization) works for me very consistently.


On Jan 11, 7:29 pm, Alpinweis alpinw...@gmail.com wrote:
 I am using the following code taken from Watir Wiki on JS Popups:

     def check_for_popups(title=Windows Internet Explorer,
 button=OK, user_input=nil)
       popup = Thread.new {
         autoit = WIN32OLE.new('AutoItX3.Control')
         ret = autoit.WinWait(title,,60)
         if (ret == 1)
           puts Popup
           autoit.WinActivate(title)
           puts after WinActivate
           button.downcase!
           if button.eql?('ok') || button.eql?('yes') || button.eql?
 ('continue') || button.eql?('open') || button.eql?('allow')
             autoit.Send(user_input) if user_input
             autoit.Send({Enter})
           else
             autoit.Send({tab})
             autoit.Send({tab}) if title == 'Open'
             autoit.Send({Enter})
           end
         elsif (ret == 0)
           puts Popup failed to show up
         end
       }
       at_exit { Thread.kill(popup) }
     end

 I am using it with click_no_wait. My problem is that
 autoit.WinActivate often fails (looks like at random) when checking
 for a 'File Open' popup with a text field for the filename. It never
 succeeds on the first run, might succeed on the second or third try.
 It does not seem to fail when checking for a simple  javasrcipt
 confirmation popup.

 I am running on Windows 7 x64, watir 1.6.5, ruby oneclick installer
 1.8.6-27 with the patch for click_no_wait applied, original
 AutoItX3.dll registered (downloaded from AutoIt website, since the one
 included with watir 1.6.5 does not work for me). There is also an
 AutoItX3_x64.dll. I tried to rename it to AutoItX3.dll and register it
 but this did not help.

 Would appreciate any help on how to fix this.
-- 
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: Support Sheriff

2009-12-12 Thread jw
Thanks to all of you who give your time to make the community strong
and help it grow by helping us newbies!

-josh

On Dec 10, 6:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Thanks to Željko and the rest of the Watir team for your confidence in
 me.  I'm honored to be counted among such a great group of people.

 I'll do my best not to let it go to my head.  ;-)

 -Tiffany

 On Dec 10, 3:50 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:

  Watir team had a little chat and we decided it would be a good idea to grow.

  I am glad I can announce that Tiffany Fodor and Wesley Chen have accepted to
  be added to Watir community team with title of Support Sheriff:

 http://watir.com/team/

  Tiffany answers a lot of questions and Wesley is helping us moderate the
  group. I hope both of them will continue with business as usual.

  If you have a nice word for them, now is the time. :)

  Željko
  --
  watir.com - community manager
  watirpodcast.com - host

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: How to easily get button index?

2009-12-10 Thread jw
when poking around at the page, trying to find attributes of UI
elements, it's incredibly useful to open your webpage, start irb, get
a new Watir::IE using attach, then just play around with
puts $ie.buttons[1]
puts $ie.links[12]
etc

On Dec 9, 8:20 pm, Marlon marlonmoja...@gmail.com wrote:
 Hi,

 How can I easy get button index?

 Right now I am using this command

 - $ie.buttons.each { |b| puts b.to_s }

 to get the buttons but it only shows the button attributes but not the
 index. Is there any plugin in firefox (aside from firebug) or code
 that i can use to easily get it.

 Thanks and keep it up!

 -Marlon

-- 
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] using rspec -b (backtrace) option makes watir run in an invisible window

2009-12-02 Thread jw
Is this intended behavior?  The window is invisible, when I look in
Process explorer and try to bring IE's window to front it says no
visible window found.
Oddly, the window becomes visible when calling enabled_popup.  This is
about 20 seconds into the test, so it's not window lag and the test is
usually successful upon completion about 10 seconds later.

Without the -b option it runs normally; the window appears on creation
and you can watch the whole test.
IE on XP probably sp3, nothing out of the ordinary...

any insight is appreciated

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Unable to acces frame by name ok on a PC but ok on an other PC with same script...pb with XP SP3 ????

2009-11-29 Thread jw
You probably have tried this, but just in case...  you get access
refused when you do

ie.frame(:index,1).text_field(:index,1).flash

but what if you just do

ie.frame(:index,1).exists?


On Nov 28, 1:34 pm, pierrelebai...@gmail.com
pierrelebai...@gmail.com wrote:
 I have a script that goes perfectly on my notebook, with ruby 1.8.6
 and watir 1.8.6 and XP SP2 on whose the script is perfect...

 I copy / paste the scrip on a other PC, same ruby version ,same watir
 version, the only one difference is Windows XP SP3.and it crash !!

 I can't acces frame I show them the frames with show_all_objects, but
 impossible to acces them...is there a problem with rigth access with
 windows XP SP3 ?

 if I try by index I have a acces refused

 example by name an by index below

 Thank's lot if you have a solution...

 irb(main):001:0 require 'watir'
 irb(main):002:0 ie = Watir::IE.start(http://192.168.47.36:8080/
 XINDOC-DEV/inde
 x.htm)
 = #Watir::IE:0x32ae588 @error_checkers=[],
 @page_container=#Watir::IE:0x32ae5
 88 ..., @activeObjectHighLightColor=yellow, @ole_object=nil,
 @rexmlDomobject=
 nil, @logger=#Watir::DefaultLogger:0x32ae498 @level=2,
 @formatter=#Logger::Sim
 pleFormatter:0x32ae3d0 @datetime_format=%d-%b-%Y %H:%M:%S,
 @default_formatter
 =#Logger::Formatter:0x32ae45c @datetime_format=nil, @progname=nil,
 @logdev=#L
 .

 irb(main):004:0 ie.show_frames
 there are 2 frames
 = 0..1
 irb(main):005:0 ie.show_all_objects
 ---Objects in page -
                   id=                 src=
 Document HTML     name=emptyRow       id=                 src=
 Document HTML     name=mainFrame      id=
 src=home.screen
 = nil

 irb(main):003:0 ie.frame(:name, 'mainFrame').exists?
 Watir::Exception::UnknownFrameException: Unable to locate a frame with
 name main
 Frame
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 frame.rb:40:in
  `locate'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 frame.rb:47:in
  `initialize'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 container.rb:1
 02:in `new'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 container.rb:1
 02:in `frame'
         from (irb):3

 BY INDEX :
 irb(main):020:0 ie.frame(:index,1).text_field(:index,1).flash
 WIN32OLERuntimeError: document
     OLE error code:80070005 in Unknown
       AccÞs refusÚ.

     HRESULT error code:0x80020009
       Une exception s'est produite.
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 frame.rb:52:in
  `method_missing'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 frame.rb:52:in
  `document'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 container.rb:7
 38:in `locate_input_element'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements
 .rb:5:in `locate'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:49:
 in `assert_exists'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:239
 :in `flash'
         from (irb):20
 irb(main):021:0

 Best regards

-- 
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