[wtr-general] Re: Company Logo

2011-02-03 Thread Željko Filipin
On Thu, Feb 3, 2011 at 7:39 AM, Betsy joybe...@gmail.com wrote:
 logo mailed. :)

Added it to http://watir.com/

Ž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] Working with two browser instances in FireWatir

2011-02-03 Thread Alastair Montgomery
Hi,

The test I am writing needs two browser instances to test session
management, the problem is once I've been working in the second
browser instance I cannot find a link in the first instance.


I have defined my test case as,

def testLogin4
#Test session exists condition, cancel login
$log.debug ===testLogin4===
#Login First Session
browserOne = Watir::Browser.start($myPAR.url)
sessionOne = Login.new(browserOne,$myPAR.user,$myPAR.password)
checkLogin(browserOne)
#Login Second Session
browserTwo = Watir::Browser.start($myPAR.url)
sessionTwo = Login.new(browserTwo,$myPAR.user,$myPAR.password)
#Check Session Exists Warning
myElements = CSVRead.new(data/
testLoginDialogElements.csv).array
checkElements(browserTwo,myElements)
browserTwo.button(:id,ws-dialog-cancel).click
#Check dropped back to the login screen
myElements = CSVRead.new(data/loginElements.csv).array
checkElements(browserTwo,myElements)
#Check original session okay
assert(browserOne.link(:id,ws-logout).exists?)
sessionOne.Logout(browserOne)
browserOne.close
browserTwo.close
$log.debug ===testLogin4===
end

This work okay up until the line assert(browserOne.link(:id,ws-
logout).exists?) which the script doesn't find.
Is there something I need to do to switch focus back to the first
browser session?

TIA
Alastair

-- 
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: Working with two browser instances in FireWatir

2011-02-03 Thread Alastair Montgomery
Here is a simpler example which fails locating the ws-logout link
after the second browser instance has been opened

#Login First Session
browserOne = Watir::Browser.start($myPAR.url)
browserOne.text_field(:name, username).set $myPAR.user
browserOne.text_field(:name, password).set $myPAR.password
browserOne.button(:id, login-btn).click
browserOne.label(:id,acms-ws-select-
label).wait_until_present
assert(browserOne.link(:id,ws-logout).exists?,Cannot find
logout link)

#Login Second Session
browserTwo = Watir::Browser.start($myPAR.url)

assert(browserOne.link(:id,ws-logout).exists?,Cannot find
logout link)

-- 
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: Working with two browser instances in FireWatir

2011-02-03 Thread Alastair Montgomery
Just found similar issue raised on StackOverFlow
http://stackoverflow.com/questions/3980001/using-watir-to-control-multiple-firefox-instances

Is the only answer to switch to Vapir or Webdriver?

-- 
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] Intermittent Watir issue with Firefox

2011-02-03 Thread Stephen Mc Gowan
Hi,

I'm seeing an intermittent watir issue with firefox. I really don't know
whats causing it, I can't seem to cause it to happen reliably. I've seen a
thread from last may discussing something similar and a really hacky work
around:http://osdir.com/ml/watir-general/2010-05/msg00134.html

I guess I'm hoping some better solution might have popped up in the
meantime.

It's giving me the following error.


C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in
`js_eval': this.docShell is null (JsshSocket::JSTypeError)

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:194:in
`set_browser_document'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:52:in
`initialize'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
`new'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
`new'
from ./Ruby/goto.rb:7

and goto.rb is here:

require rubygems
require watir

puts('ruby: Using firefox')
Watir::Browser.default = 'firefox'
puts('ruby: Starting browser')

b = Watir::Browser.new
puts('ruby: Browser started')
b.maximize
b.goto(ARGV[0])


Any ideas?

Cheers,
-- 
Stephen Mc Gowan.

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

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


Re: [wtr-general] Intermittent Watir issue with Firefox

2011-02-03 Thread Prajakta Jadhav
How are you using 'watir' for firefox? You should be using 'firewatir',
right?

-Prajakta

On Thu, Feb 3, 2011 at 7:43 PM, Stephen Mc Gowan mccl...@gmail.com wrote:

 Hi,

 I'm seeing an intermittent watir issue with firefox. I really don't know
 whats causing it, I can't seem to cause it to happen reliably. I've seen a
 thread from last may discussing something similar and a really hacky work
 around:http://osdir.com/ml/watir-general/2010-05/msg00134.html

 I guess I'm hoping some better solution might have popped up in the
 meantime.

 It's giving me the following error.


 C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in
 `js_eval': this.docShell is null (JsshSocket::JSTypeError)

 C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:194:in
 `set_browser_document'

 C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:52:in
 `initialize'

 C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
 `new'

 C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
 `new'
 from ./Ruby/goto.rb:7

 and goto.rb is here:

 require rubygems
 require watir

 puts('ruby: Using firefox')
 Watir::Browser.default = 'firefox'
 puts('ruby: Starting browser')


 b = Watir::Browser.new
 puts('ruby: Browser started')
 b.maximize
 b.goto(ARGV[0])


 Any ideas?

 Cheers,
 --
 Stephen Mc Gowan.

  --
 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.comwatir-general%2bunsubscr...@googlegroups.com


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

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


[wtr-general] Re: Need help, trying to develop tests for a dojo filtering select widget.

2011-02-03 Thread swares
Forgot some information.

Running a fully patched English version of Windows XP Pro with IE
8.0.6001.18702.

Spent a long time trying to figure this out, from the posts I reviewed
it looks like what I have should work, so not sure where to go from
here.

Running these in irb by hand to work out the sequence.  another issue
is send_keys seemed to send the keystroke to the irb window instead of
the browser window.

On Feb 1, 2:54 pm, swares swa...@us.ibm.com wrote:
 Trying to develop watir tests for an app using dojo, need to test a
 dijit Filtering Select widget.
 Was able to get part of this figured out but cannot figure out how to
 trigger some events.
 Trying to simulate the use of a selection widget via keyboard and
 mouse interaction.

 The selection list is in a div - ul - li format, and the widget
 consists of a number of components so the normal
 watir select methods do not work.

 Usedhttp://www.java2s.com/Tutorial/JavaScriptDemo/dijitformFilteringSelec...
 as an example for these widgit tests, not getting any errors but not
 getting the expected results either (ie. cmd runs but nothing apparent
 happens).  I didn't include all the ways I tried to do this just the
 way I though was most likely to work.

 1) After setting a value, I need to fire a keypress event to cause the
 popup to appear.
 Then I want to hit enter to finalize the select.

 2) After popping open the select widget and highlighting an entry, I
 need to select it.

 watir (1.7.1)
 ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

 require 'watir'
 Watir::Browser.default  = 'ie'
 b = Watir::Browser.new;
 b.goto 'http://www.java2s.com/Tutorial/JavaScriptDemo/
 dijitformFilteringSelect.htm'
 b.text_field(:class = 'dijitReset').focus()

 # first method of selecting option via text input
 b.text_field(:class = 'dijitReset').set '1'
 b.div(:id =
 'widget_dijit_form_FilteringSelect_0').fire_event('onkeyup') # not
 triggering widget
 b.send_keys('{ENTER}') # did not trigger widget

 # Second method of selecting option via mouse input
 b.div(:class = 'dijitArrowButtonInner').fire_event('onmousedown')
 b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
 '11').fire_event('onmouseover')
 b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
 '11').click # did not trigger widget

 Thanks for your help,
 Scott Wares

-- 
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: Working with two browser instances in FireWatir

2011-02-03 Thread Dave McNulla
I think that is watir-webdriver, not webdriver. I tried watir and got
the same results as you.

Dave

On Feb 3, 5:34 am, Alastair Montgomery doodl...@gmail.com wrote:
 Just found similar issue raised on 
 StackOverFlowhttp://stackoverflow.com/questions/3980001/using-watir-to-control-mul...

 Is the only answer to switch to Vapir or Webdriver?

-- 
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: Need help, trying to develop tests for a dojo filtering select widget.

2011-02-03 Thread swares
I have looked at it with IE Developer Toolbar and Firebug to see where
the events appeared to be attached.  Selected the elements for
inspection in IE but could not inspect the actual menu options using
that method as it performed a select.  In Firefox, after opening the
select, when I click so I can select elements for inspection the
select closes and I can't reopen the dialog with the inspection tool.

The code you provided did work to set this value w/o causing the
widgets validation routines show a error in the actual code I'm trying
to test.  When I tried to set the value directly into the text field,
it would throw validation errors after switching to another field
caused the validation function to run.  So that helps me with one part
of the problem.

Still, setting a partial value (as if typing) and firing this does not
trigger the select dropdown showing the items that match the input,
the bigger problem along with selection from that list via kb/mouse.

As far as watching the events, I did watch a session where I (manually
and via watir) used the widget and watched the detected events in
firebug but did not find enlightenment, it could be that I have not
used these browser tools that extensively.


On Feb 3, 8:38 am, Basim Baassiri ba...@baassiri.ca wrote:
 Have you tried tools like firebug to inspect the events to listen to and the
 html

 I was able to set the filtercombobox with the following code
 Does this work for you?

 input_id = dijit_form_FilteringSelect_0
 input_event = onkeypress
 b.text_field(:id = input_id).set '11'
 b.text_field(:id = input_id).fire_event input_event

 On Thu, Feb 3, 2011 at 9:44 AM, swares swa...@us.ibm.com wrote:
  Forgot some information.

  Running a fully patched English version of Windows XP Pro with IE
  8.0.6001.18702.

  Spent a long time trying to figure this out, from the posts I reviewed
  it looks like what I have should work, so not sure where to go from
  here.

  Running these in irb by hand to work out the sequence.  another issue
  is send_keys seemed to send the keystroke to the irb window instead of
  the browser window.

  On Feb 1, 2:54 pm, swares swa...@us.ibm.com wrote:
   Trying to develop watir tests for an app using dojo, need to test a
   dijit Filtering Select widget.
   Was able to get part of this figured out but cannot figure out how to
   trigger some events.
   Trying to simulate the use of a selection widget via keyboard and
   mouse interaction.

   The selection list is in a div - ul - li format, and the widget
   consists of a number of components so the normal
   watir select methods do not work.

   Usedhttp://
 www.java2s.com/Tutorial/JavaScriptDemo/dijitformFilteringSelec...
   as an example for these widgit tests, not getting any errors but not
   getting the expected results either (ie. cmd runs but nothing apparent
   happens).  I didn't include all the ways I tried to do this just the
   way I though was most likely to work.

   1) After setting a value, I need to fire a keypress event to cause the
   popup to appear.
   Then I want to hit enter to finalize the select.

   2) After popping open the select widget and highlighting an entry, I
   need to select it.

   watir (1.7.1)
   ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

   require 'watir'
   Watir::Browser.default  = 'ie'
   b = Watir::Browser.new;
   b.goto 'http://www.java2s.com/Tutorial/JavaScriptDemo/
   dijitformFilteringSelect.htm'
   b.text_field(:class = 'dijitReset').focus()

   # first method of selecting option via text input
   b.text_field(:class = 'dijitReset').set '1'
   b.div(:id =
   'widget_dijit_form_FilteringSelect_0').fire_event('onkeyup') # not
   triggering widget
   b.send_keys('{ENTER}') # did not trigger widget

   # Second method of selecting option via mouse input
   b.div(:class = 'dijitArrowButtonInner').fire_event('onmousedown')
   b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
   '11').fire_event('onmouseover')
   b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
   '11').click # did not trigger widget

   Thanks for your help,
   Scott Wares

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

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

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

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


Re: [wtr-general] Re: Need help, trying to develop tests for a dojo filtering select widget.

2011-02-03 Thread Basim Baassiri
I found this posting that might help
http://blog.saush.com/2008/05/18/using-rspec-and-watir-for-functional-testing-in-web-applications/

http://blog.saush.com/2008/05/18/using-rspec-and-watir-for-functional-testing-in-web-applications/Here's
the part code that was mentioned in the posting that I've modified
class Watir::IE
  def fire_keydown_on(element_id, key)
ie.Document.parentWindow.execScript(key = document.createEventObject();
key.keyCode = #{key})

 
ie.Document.parentWindow.execScript(document.getElementById('#{element_id}').fireEvent('onkeypress',
key))
  end
end

input_id = dijit_form_FilteringSelect_0
b.fire_keydown_on input_id, '32'

Let me know if that works for you

On Thu, Feb 3, 2011 at 12:25 PM, swares swa...@us.ibm.com wrote:

 I have looked at it with IE Developer Toolbar and Firebug to see where
 the events appeared to be attached.  Selected the elements for
 inspection in IE but could not inspect the actual menu options using
 that method as it performed a select.  In Firefox, after opening the
 select, when I click so I can select elements for inspection the
 select closes and I can't reopen the dialog with the inspection tool.

 The code you provided did work to set this value w/o causing the
 widgets validation routines show a error in the actual code I'm trying
 to test.  When I tried to set the value directly into the text field,
 it would throw validation errors after switching to another field
 caused the validation function to run.  So that helps me with one part
 of the problem.

 Still, setting a partial value (as if typing) and firing this does not
 trigger the select dropdown showing the items that match the input,
 the bigger problem along with selection from that list via kb/mouse.

 As far as watching the events, I did watch a session where I (manually
 and via watir) used the widget and watched the detected events in
 firebug but did not find enlightenment, it could be that I have not
 used these browser tools that extensively.


 On Feb 3, 8:38 am, Basim Baassiri ba...@baassiri.ca wrote:
  Have you tried tools like firebug to inspect the events to listen to and
 the
  html
 
  I was able to set the filtercombobox with the following code
  Does this work for you?
 
  input_id = dijit_form_FilteringSelect_0
  input_event = onkeypress
  b.text_field(:id = input_id).set '11'
  b.text_field(:id = input_id).fire_event input_event
 
  On Thu, Feb 3, 2011 at 9:44 AM, swares swa...@us.ibm.com wrote:
   Forgot some information.
 
   Running a fully patched English version of Windows XP Pro with IE
   8.0.6001.18702.
 
   Spent a long time trying to figure this out, from the posts I reviewed
   it looks like what I have should work, so not sure where to go from
   here.
 
   Running these in irb by hand to work out the sequence.  another issue
   is send_keys seemed to send the keystroke to the irb window instead of
   the browser window.
 
   On Feb 1, 2:54 pm, swares swa...@us.ibm.com wrote:
Trying to develop watir tests for an app using dojo, need to test a
dijit Filtering Select widget.
Was able to get part of this figured out but cannot figure out how to
trigger some events.
Trying to simulate the use of a selection widget via keyboard and
mouse interaction.
 
The selection list is in a div - ul - li format, and the widget
consists of a number of components so the normal
watir select methods do not work.
 
Usedhttp://
  www.java2s.com/Tutorial/JavaScriptDemo/dijitformFilteringSelec...
as an example for these widgit tests, not getting any errors but not
getting the expected results either (ie. cmd runs but nothing
 apparent
happens).  I didn't include all the ways I tried to do this just the
way I though was most likely to work.
 
1) After setting a value, I need to fire a keypress event to cause
 the
popup to appear.
Then I want to hit enter to finalize the select.
 
2) After popping open the select widget and highlighting an entry, I
need to select it.
 
watir (1.7.1)
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
 
require 'watir'
Watir::Browser.default  = 'ie'
b = Watir::Browser.new;
b.goto 'http://www.java2s.com/Tutorial/JavaScriptDemo/
dijitformFilteringSelect.htm'
b.text_field(:class = 'dijitReset').focus()
 
# first method of selecting option via text input
b.text_field(:class = 'dijitReset').set '1'
b.div(:id =
'widget_dijit_form_FilteringSelect_0').fire_event('onkeyup') # not
triggering widget
b.send_keys('{ENTER}') # did not trigger widget
 
# Second method of selecting option via mouse input
b.div(:class = 'dijitArrowButtonInner').fire_event('onmousedown')
b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
'11').fire_event('onmouseover')
b.ul(:id = 'dijit_form_FilteringSelect_0_popup').li(:text =
'11').click # did not trigger widget
 
Thanks for your help,
Scott Wares
 
   --
   Before posting, 

Re: [wtr-general] Re: Working with two browser instances in FireWatir

2011-02-03 Thread Сергей Демьянчук
Hi, Alastair Montgomery.


At the moment firewatir does not support multi browsers. FireWatir is using
jssh to send command's and to communicate with FireFox via JavaScript.
Unfortunately FireFox open socket and listed on port 9997 for JSSH purpose.
This port defined statically in the implementation of FireFox and can not be
redefined dynamicaly. There was some discussion on the official Mozilla
community about opportunity to use multiple profiles with multiple port and
this bug was fixed but only for later versions of FireFox 2.0.
I think watir-webdriver with watir is something that can help, cuz
watir-webdriver give an opportunity to use multiple instances of the FireFox
browser's.

-- 
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 day and Selenium Conf

2011-02-03 Thread Charley Baker
Hi all,

  Bret and I are leading up a Watir Day which will be Sunday April 3rd
in San Francisco as part of the Selenium Conference. You can find out
more information here on Watir day: http://watir.com/watir-day/   and
the  Selenium Conference: http://www.seleniumconf.com/.

We're excited to have the two teams work together and focus on
Automation Testing. Whether you're using Selenium or Watir, we would
love to have you attend this conference. We are looking for sponsors
for Watir Day and will have information up soon on more details about
the conference and booking tickets. Feel free to reach out to us on
sponsoring or other questions you might have. We will be updating the
page as we have more information.

Follow us on twitter: @watir for the latest annnouncements. We'll have
an rss feed on the page as well. I hope to see many of you there.

Cheers,

Charley Baker
Lead Developer, Watir, http://watir.com

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

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


[wtr-general] DEP (Data Execution Protection) crashes in Server 2008R2

2011-02-03 Thread Chuck van der Linden
I've been setting up a VM to do testing on our product and the easiest
thing for me to do is to have the automation code running on the same
system were we install the product (and database etc).  Hence the use
of Server2008 as the platform since that is official supported (and I
figured would have more longevity for me than using Server 2003)

The problem I'm encountering is that a few steps into the test scripts
(done via cucumber) I'm getting errors, and then windows shuts down
the whole works because it feels that it's accessing memory that it
shouldn't.

The relevant error displayed at the command line looks like this

C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.7.1/lib/watir/ie-class.rb:516:
[BUG] Segmentation fault
ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]

I can turn off DEP and that seems to get me past this (need to patch
up some other issues with the scripts before I can tell) but it
concerns me that I need to do that, and makes me wonder what either
Watir or Ruby is doing that makes windows think it's gone 'outside of
it's swim lane in the memory pool' so to speak.

Anyone have any bright ideas aside from disabling DEP for ruby.exe and
crossing my fingers?

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