[wtr-general] To check alignement of objects in a Page using Watir

2009-10-06 Thread Pallavi Sharma
Hi

Can we check the alignments of the page using watir ? Is it possible?

Like if i can get the expected location of the object on the page, can i get
the actual using watir compare their values?


If anyone knows about it please let me know.


Thanks

Pallavi.

--~--~-~--~~~---~--~~
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: To check alignement of objects in a Page using Watir

2009-10-06 Thread Bill Agee
I believe there are ways to get the coordinates of elements (for IE at
least), but I have never bothered with that due to concerns about creating
fragile tests.  Resizing the browser, the browser window opening
unexpectedly at different coordinates, or running the script on a machine
with a different display resolution are situations that might break such
tests.

It might be possible to have some success with this if you used relative
coordinates (that is, using the position of elements relative to the main
browser window instead of the desktop).  But it would be best to assume the
worst ahead of time.  :) For example, I'm not sure what happens to relative
element coordinates if the different toolbars in a browser are
displayed/hidden.  Not to mention, small changes to the layout of the
elements on the page might break hardcoded locations of other elements.


On Tue, Oct 6, 2009 at 12:04 AM, Pallavi Sharma write2pall...@gmail.comwrote:

 Hi

 Can we check the alignments of the page using watir ? Is it possible?

 Like if i can get the expected location of the object on the page, can i
 get the actual using watir compare their values?


 If anyone knows about it please let me know.


 Thanks

 Pallavi.

 


--~--~-~--~~~---~--~~
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: File Field Help

2009-10-06 Thread Bill Agee
Looks like it works if you fire the onchange event on the input tag manually
- this code works for me:

(f is the Firefox object)

upload_element = f.element_by_xpath(//inp...@name='field_uploadfile'])
upload_element.set(C:\\foo.txt)
upload_element.fire_event(onchange)
f.span(:text, Upload Video).click()


On Mon, Oct 5, 2009 at 3:12 AM, Raveendran P jazzezr...@gmail.com wrote:

 Hi Bill,


 My Bad luck ,

 After $ff.refresh -- Still the upload video button is not enabled .. :)

 Awaiting your reply

 Thanks



 On Mon, Oct 5, 2009 at 3:04 PM, Bill Agee billa...@gmail.com wrote:

 Ah, so it's a difference in behavior between FireWatir and Watir?

 Not sure why that would happen.  Perhaps setting the field with Firefox
 doesn't fire the necessary events to enable the upload button?  Don't know.

 You might try invoking the refresh() method on the Firefox object after
 you set the field value.  I doubt it will help, but you never know.  I've
 had problems where what is displayed in the browser seems to go out of sync
 with FireWatir's view of the DOM (specifically, elements you can see in the
 page are not accessible from script).  But refreshing the browser usually
 fixes it.


 On Sun, Oct 4, 2009 at 9:00 PM, Raveendran P jazzezr...@gmail.comwrote:

 Hi Bill,

 For more details,


 The same code working in WATIR:


 $ie.file_field(:name, field_uploadfile).set($video_files[0])

 $ie.span(:text, 'Upload Video').click


 Here i can able to click the Upload Video span . Because it is enabled
 after set the file_field path.

 But the same code not working in FireWatir for Firefox browser

 It means, The Upload Video span not enabled automatically after set the
 path like

   $ff.file_field(:name, field_uploadfile).set($video_files[0])


 Any more details need ?






 On Sun, Oct 4, 2009 at 8:54 PM, Raveendran P jazzezr...@gmail.comwrote:

 Hi Bill,

 That code sets properly. Its working exactly . But i need alternate way
 to do this.

 Because The upload button is not enabled automatically after set the
 p[ath via like this.


 For more details

 1. Login youtube.
 2. Uninstall Fal;sh player in your machine
 3. Goto upload video page.
 4. Set the path like this

 $ie.file_field( :name, document ).set( c:\\Watir
 Testware\\Data\\vb.txt )

 5. Still the upload button disabled.


 Thats why i am asking the alternate way to do this.

 Awaiting your reply

 Thanks


 On Sun, Oct 4, 2009 at 2:55 AM, Bill Agee billa...@gmail.com wrote:

 What browser version are you using?  Also, is the path to the file
 being set properly in the dialog?

 Thanks
 Bill



 On Sat, Oct 3, 2009 at 4:28 AM, Raveendran P jazzezr...@gmail.comwrote:

 Hi All,

 Any alternate method for this code

 $ie.file_field( :name, document ).set( c:\\Watir
 Testware\\Data\\vb.txt )


 I need alternate for this code ...

 Reason :

 After did the above line the Upload button is not enabled
 automatically. But it happens when i select files manually



 Thanks in Advance

 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.com









 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.com




 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.com









 --
 Regards,
 P.Raveendran
 http://raveendran.wordpress.com


 


--~--~-~--~~~---~--~~
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: bring_to_front function not working...

2009-10-06 Thread John Kolokotronis

Maybe try using AutoIT's WinSetOnTop function directly? Like this:

require 'win32ole'

AutoIt = WIN32OLE.new(AutoItX3.Control)
AutoIt.WinSetOnTop([REGEXPTITLE:#...@ie.get_title}], , 1)

Regards,

John
--~--~-~--~~~---~--~~
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: Disable javascript through ruby/watir

2009-10-06 Thread arihan sinha
Hi All,

Is there any option to disable javascript of browser through ruby/watir?


Thanks

Arihan



 


--~--~-~--~~~---~--~~
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 identify pop-up windows using watir tool

2009-10-06 Thread Betsy

Hi all,

I tried using the script that has been put up by Ankur.

It worked with a few changes though..

require 'watir'
require 'win32ole'
require 'rubygems'
ai = WIN32OLE.new(AutoItX3.Control)
ie=Watir::IE.new
#Go to AutoIt website
ie.goto(http://www.autoitscript.com/autoit3/downloads.shtml;)
#Click Download AutoIt image
ie.image(:alt,'Download AutoIt').click!
#Wait for the pop-up window with the specified title supplied to come
res=ai.WinWait(File Download - Security Warning,,30)
puts res
#Always try to Activate the pop-up window before using ControlClick fn
()
res=ai.WinActivate(File Download - Security Warning)
puts res
#Click on the specified control on the pop-up window
res=ai.ControlClick(File Download - Security Warning,,Save)
puts res
puts\n
#Wait for the pop-up window with the specified title supplied to come
res=ai.WinWait(Save As,,30)
puts res
#Always try to Activate the pop-up window before using ControlClick fn
()
res=ai.WinActivate(Save As)
puts res
#Send the path in the pop-up window where you want to store the
respective file
res=ai.ControlSend(Save As,,Edit1, C:\AutoItV3.exe)
puts res
#Click on the specified control on the pop-up window
res=ai.ControlClick(Save As,,Save)
puts res

Now I want to do the same on Mozilla Firefox. I tried to modify the
script like this:-

require 'firewatir'
require 'watir'
require 'win32ole'
require 'rubygems'
ai = WIN32OLE.new(AutoItX3.Control)
ie=FireWatir::Firefox.new
#Go to AutoIt website
ie.goto(http://www.autoitscript.com/autoit3/downloads.shtml;)
#Click Download AutoIt image
ie.image(:alt,'Download AutoIt').click!
#Wait for the pop-up window with the specified title supplied to come
res=ai.WinWait(Opening autoit-v3-setup.exe,,30)
puts res
#Always try to Activate the pop-up window before using ControlClick fn
()
res=ai.WinActivate(Opening autoit-v3-setup.exe)
puts res
#Click on the specified control on the pop-up window
res=ai.ControlClick(Opening autoit-v3-setup.exe,,Save File)
puts res
puts\n
#Wait for the pop-up window with the specified title supplied to come
res=ai.WinWait(Save As,,30)
puts res
#Always try to Activate the pop-up window before using ControlClick fn
()
res=ai.WinActivate(Save As)
puts res
#Send the path in the pop-up window where you want to store the
respective file
res=ai.ControlSend(Save As,,Edit1, C:\AutoItV3.exe)
puts res
#Click on the specified control on the pop-up window
res=ai.ControlClick(Save As,,Save)
puts res

but it apparently does not work... can anyone let me know how to
proceed??

Thnks in advance..



On Sep 17, 6:17 pm, Ankur Gera ankurg...@gmail.com wrote:
  Hi tester1,

     Try to run and understand the following code then you will be able to
 easily handle the pop-ups in the future:-
  require 'watir'
 require 'win32ole'

 ai = WIN32OLE.new(AutoItX3.Control)

 ie=Watir::IE.new

 #Go to AutoIt website
 ie.goto(http://www.autoitscript.com/autoit3/downloads.shtml;)

 #Click Download AutoIt image
 ie.image(:src,/download_autoit/).click_no_wait

 #Wait for the pop-up window with the specified title supplied to come
 res=ai.WinWait(File Download - Security Warning,,30)
 puts res

 #Always try to Activate the pop-up window before using ControlClick fn()
 res=ai.WinActivate(File Download - Security Warning)
 puts res

 #Click on the specified control on the pop-up window
 res=ai.ControlClick(File Download - Security Warning,,Save)
 puts res

 puts\n
 #Wait for the pop-up window with the specified title supplied to come
 res=ai.WinWait(Save As,,30)
 puts res

 #Always try to Activate the pop-up window before using ControlClick fn()
 res=ai.WinActivate(Save As)
 puts res

 #Send the path in the pop-up window where you want to store the respective
 file
 res=ai.ControlSend(Save As,,Edit1, C:\AutoItV3.exe)
 puts res

 #Click on the specified control on the pop-up window
 res=ai.ControlClick(Save As,,Save)
 puts res

 Please revert back me/group if u need any further help.
 Thanks  Regards,
 Ankur Gera
--~--~-~--~~~---~--~~
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: Platforms

2009-10-06 Thread Željko Filipin
On Tue, Oct 6, 2009 at 4:30 AM, Bret Pettichord bpettich...@gmail.com
wrote:
 Not sure if this is clear that Watir 1.6.2 does not work with Ruby
 1.9.1.

Made it explicit in Watir/Ruby table.

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



[wtr-general] Re: Script on select list item, clickon btn1 and Logoutfunction()

2009-10-06 Thread venkat
Hi,

Thanks for responding back, actually my application is running fine.

Exactly Error shown is the following:

ruby y.rb

C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/element.rb:56:in
`assert_exists': Unable to locate element, using :name, jurisdiction
(Watir::Exception::UnknownObjectException)

from 
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/input_elements.rb:62:in
`select_item_in_select_list'

from 
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/input_elements.rb:46:in
`select'

from y.rb:23

Exit code: 1



My watir script y.rb is the following:



require 'rubygems'

 require watir

 require 'test/unit'

 require 'win32ole'

 require 'watir/contrib/ie-new-process'

 test_site = http://xyz/home.do;

 ie = Watir::IE.new_process

 ie.set_fast_speed

  ie.goto test_site

  ie.text_field(:name, 'userName').set('darin')

  ie.text_field(:name, 'password').set('Tester123')

  ie.button(:value, 'Log in').click

  sleep (20)

  ie.goto('http://xyz/ManageJurisdictions.do')

  sleep (20)

  ie.select_list( :name , jurisdiction).select(Development)

  sleep (20)

  ie.button(:value, 'btn1').click

  sleep (20)

  ie.link(:text,LogOut).click

  ie.close()



I want to perform 3 actions in the page.

Select item from the drop down list box -- development

Click on SELECT button

Click on Logout

(FYI: Logout has the following properties:

Name  - Value

Href   -  xyz.

OnClick - logOutFunction()

OnClick - gotoActionUrl('Login.do?dispatchto=logout')



Please help me



thanks,

venky


On Mon, Oct 5, 2009 at 6:04 PM, Anna Gabutero a...@lavabit.com wrote:


 On Mon, Oct 05, 2009 at 05:46:10PM +0530, venkat wrote:
  Hi,
  I got the following error and my script fails to identify the list item,
  can't click the Select button and Logout too fails. Can anyone please
 help
  me.
 
  HTTP Status 500 -
 

 This is a problem with the application you're testing, not a problem
 with Watir.  Read this for more information:
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html


 - Anna


 


--~--~-~--~~~---~--~~
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: To check alignement of objects in a Page using Watir

2009-10-06 Thread Paul Rogers
If you really want to do this type of thing, id take a look at
http://xbdiff.com

I met Jeff, the creator of this about a year ago, and was amazed what he was
trying to do.

Paul

On Tue, Oct 6, 2009 at 1:49 AM, Bill Agee billa...@gmail.com wrote:

 I believe there are ways to get the coordinates of elements (for IE at
 least), but I have never bothered with that due to concerns about creating
 fragile tests.  Resizing the browser, the browser window opening
 unexpectedly at different coordinates, or running the script on a machine
 with a different display resolution are situations that might break such
 tests.

 It might be possible to have some success with this if you used relative
 coordinates (that is, using the position of elements relative to the main
 browser window instead of the desktop).  But it would be best to assume the
 worst ahead of time.  :) For example, I'm not sure what happens to relative
 element coordinates if the different toolbars in a browser are
 displayed/hidden.  Not to mention, small changes to the layout of the
 elements on the page might break hardcoded locations of other elements.



 On Tue, Oct 6, 2009 at 12:04 AM, Pallavi Sharma 
 write2pall...@gmail.comwrote:

 Hi

 Can we check the alignments of the page using watir ? Is it possible?

 Like if i can get the expected location of the object on the page, can i
 get the actual using watir compare their values?


 If anyone knows about it please let me know.


 Thanks

 Pallavi.




 


--~--~-~--~~~---~--~~
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: Script on select list item, clickon btn1 and Logoutfunction()

2009-10-06 Thread Bill Agee
The exception from Watir indicates the problem is this line:

 ie.select_list( :name , jurisdiction).select(Development)

As the error says, there's no select list found with the name
jurisdiction.  The HTML for that element should show the way to fix the
problem - if you can't figure it out just post the HTML for that one
element.

Thanks
Bill


On Tue, Oct 6, 2009 at 2:53 AM, venkat greet.ven...@gmail.com wrote:

 Hi,

 Thanks for responding back, actually my application is running fine.

 Exactly Error shown is the following:

 ruby y.rb


 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/element.rb:56:in 
 `assert_exists': Unable to locate element, using :name, jurisdiction 
 (Watir::Exception::UnknownObjectException)


 from 
 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/input_elements.rb:62:in
  `select_item_in_select_list'


 from 
 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5.rc1/lib/watir/input_elements.rb:46:in
  `select'

 from y.rb:23

 Exit code: 1



 My watir script y.rb is the following:



 require 'rubygems'

  require watir

  require 'test/unit'

  require 'win32ole'

  require 'watir/contrib/ie-new-process'

  test_site = http://xyz/home.do;

  ie = Watir::IE.new_process

  ie.set_fast_speed

   ie.goto test_site

   ie.text_field(:name, 'userName').set('darin')

   ie.text_field(:name, 'password').set('Tester123')

   ie.button(:value, 'Log in').click

   sleep (20)

   ie.goto('http://xyz/ManageJurisdictions.do')

   sleep (20)

   ie.select_list( :name , jurisdiction).select(Development)

   sleep (20)

   ie.button(:value, 'btn1').click

   sleep (20)

   ie.link(:text,LogOut).click

   ie.close()



 I want to perform 3 actions in the page.

 Select item from the drop down list box -- development

 Click on SELECT button

 Click on Logout

 (FYI: Logout has the following properties:

 Name  - Value

 Href   -  xyz.

 OnClick - logOutFunction()

 OnClick - gotoActionUrl('Login.do?dispatchto=logout')



 Please help me



 thanks,

 venky


 On Mon, Oct 5, 2009 at 6:04 PM, Anna Gabutero a...@lavabit.com wrote:


 On Mon, Oct 05, 2009 at 05:46:10PM +0530, venkat wrote:
  Hi,
  I got the following error and my script fails to identify the list item,
  can't click the Select button and Logout too fails. Can anyone please
 help
  me.
 
  HTTP Status 500 -
 

 This is a problem with the application you're testing, not a problem
 with Watir.  Read this for more information:
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html


 - Anna




 


--~--~-~--~~~---~--~~
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] ie.goto never returns. Page never loads.

2009-10-06 Thread llemirtrauts

Hi,

I'm pretty new to Watir and I'm having an intermittent problem with
scripts hanging when a web page doesn't fully load.

I'm trying to run:-

Watir::IE.start(http://www.igindex.co.uk;)

This sometimes works but sometimes the the start method doesn't return
and the script simply hangs indefinitely so the rest of the script
doesn't run.

The issue with the website in question is probably due to the fact
that it maintains a permanent http connection to stream data. This may
be causing Watir to think the page hasn't fully loaded.

Is there any way to force a Watir script to continue running before it
thinks the page has fully loaded?

thanks,
Stuart

--~--~-~--~~~---~--~~
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] javascript popup handler times out if there is no pop up

2009-10-06 Thread iherebyresign

There is a button on the site I am testing that sometimes triggers a
javascript pop-up, and sometimes it does not. If the pop up is
triggered, my code works as it should. It handles the pop up, and then
moves on to the next record in my loop. However, if there is NO pop
up, I need my script to just continue on as if the pop up handling
code was not even there. Currently, I get this:


c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
59:in `wait_until': Timed out after 15.109 seconds.
(Watir::Exception::TimeOutException)
from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
waiter.rb:80:in `wait_until'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
enabled_popup.rb:10:in `enabled_popup'


Do you have any suggestions? This is driving me crazy! Here is a code
snippet. I need the code to continue with Step 6 if it does not see a
pop up. Thanks!


ie.button(:name, SaveWorkflowChanges).click_no_wait

# javascript pop-up handler

hwnd = ie.enabled_popup(15)

  if(hwnd)
  popup = WinClicker.new
  popup.makeWindowActive(hwnd) #Activate the window.
  popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK
button
  smsg =  _articleNumber.to_s +   + UNABLE TO PROCEED;
ACTIVE COTTAGE/VENDOR TASKS - ARTICLE SKIPPED
  log.info(smsg)

break _articleNumber

  #ie.button(:name, SaveWorkflowChanges).click()
# If there are no workflows currently mapped to the
journal...
if ie.p(:id,'savewarning').exists?
smsg =  _articleNumber.to_s +   + ie.p
(:id,'savewarning').text
log.info(smsg)



  else
# Step 6
puts 'Step 6'
Watir::Waiter.wait_until{ie.select_list(:name,
'workflowStepId').exists? }

--~--~-~--~~~---~--~~
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: javascript popup handler times out if there is no pop up

2009-10-06 Thread Charley Baker
You could wrap that in an exception handler and then continue on.

begin
...wait_until...
rescue Watir::Exception::TimeOutException
...possibly do something
end

Is that what you're looking for?

Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Tue, Oct 6, 2009 at 12:14 PM, iherebyresign jesse.austi...@gmail.comwrote:


 There is a button on the site I am testing that sometimes triggers a
 javascript pop-up, and sometimes it does not. If the pop up is
 triggered, my code works as it should. It handles the pop up, and then
 moves on to the next record in my loop. However, if there is NO pop
 up, I need my script to just continue on as if the pop up handling
 code was not even there. Currently, I get this:


 c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
 59:in `wait_until': Timed out after 15.109 seconds.
 (Watir::Exception::TimeOutException)
from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
 waiter.rb:80:in `wait_until'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
 enabled_popup.rb:10:in `enabled_popup'


 Do you have any suggestions? This is driving me crazy! Here is a code
 snippet. I need the code to continue with Step 6 if it does not see a
 pop up. Thanks!


 ie.button(:name, SaveWorkflowChanges).click_no_wait

# javascript pop-up handler

hwnd = ie.enabled_popup(15)

  if(hwnd)
  popup = WinClicker.new
  popup.makeWindowActive(hwnd) #Activate the window.
  popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK
 button
  smsg =  _articleNumber.to_s +   + UNABLE TO PROCEED;
 ACTIVE COTTAGE/VENDOR TASKS - ARTICLE SKIPPED
  log.info(smsg)

break _articleNumber

  #ie.button(:name, SaveWorkflowChanges).click()
# If there are no workflows currently mapped to the
 journal...
if ie.p(:id,'savewarning').exists?
smsg =  _articleNumber.to_s +   + ie.p
 (:id,'savewarning').text
log.info(smsg)



  else
# Step 6
puts 'Step 6'
Watir::Waiter.wait_until{ie.select_list(:name,
 'workflowStepId').exists? }

 


--~--~-~--~~~---~--~~
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] Can't seem to install watir on the MAC

2009-10-06 Thread QAguy

When I try to install the watir gem on the mac I am getting the
following:

host73:watir_site_regression employee$ sudo gem install watir --
include-dependencies
INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
ERROR: Failed to build gem native extension.

/opt/local/bin/ruby extconf.rb
checking for strncpy_s()... no
creating Makefile

make
/usr/bin/gcc-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -
I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/
include -fno-common -O2 -arch x86_64  -fno-common -pipe -fno-common  -
arch x86_64 -c win32/api.c
win32/api.c:2:21: error: windows.h: No such file or directory
win32/api.c:33: error: expected specifier-qualifier-list before
‘HANDLE’
win32/api.c: In function ‘api_free’:
win32/api.c:40: error: ‘Win32API’ has no member named ‘library’
win32/api.c:41: error: ‘Win32API’ has no member named ‘library’
win32/api.c: At top level:
win32/api.c:58: error: expected ‘)’ before ‘dwError’
win32/api.c: In function ‘callback_init’:
win32/api.c:186: error: ‘LPARAM’ undeclared (first use in this
function)
win32/api.c:186: error: (Each undeclared identifier is reported only
once
win32/api.c:186: error: for each function it appears in.)
win32/api.c:186: error: expected ‘)’ before ‘find_callback’
win32/api.c: In function ‘api_init’:
win32/api.c:233: error: ‘HMODULE’ undeclared (first use in this
function)
win32/api.c:233: error: expected ‘;’ before ‘hLibrary’
win32/api.c:234: error: ‘FARPROC’ undeclared (first use in this
function)
win32/api.c:234: error: expected ‘;’ before ‘fProc’
win32/api.c:270: error: ‘hLibrary’ undeclared (first use in this
function)
win32/api.c:280: error: ‘Win32API’ has no member named ‘library’
win32/api.c:287: error: ‘fProc’ undeclared (first use in this
function)
win32/api.c:330: error: ‘Win32API’ has no member named ‘function’
win32/api.c:338: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:341: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:344: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:347: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:350: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:353: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:367: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:373: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:376: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:379: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:382: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:385: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c: In function ‘func_init’:
win32/api.c:456: error: ‘Win32API’ has no member named ‘function’
win32/api.c:456: error: ‘FARPROC’ undeclared (first use in this
function)
win32/api.c:464: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:467: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:470: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:473: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:476: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:479: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:493: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:499: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:502: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:505: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:508: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:511: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c: At top level:
win32/api.c:528: error: expected specifier-qualifier-list before
‘DWORD’
win32/api.c:532: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CallbackFunction’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘CALLBACK’
win32/api.c:691: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or

[wtr-general] Issue with .click when selecting via id

2009-10-06 Thread QAguy

I am using rspec with safariwatir. When I try to have watir click a
link for which I have an id I see the link get highlighted in yellow
but the click action doesn't occur. Here is an example:

@browser.button(:id, ID_name).click

I then tried this:

Watir::Element::click { @browser.button(:id, anonymous_element_1)}

But this generates the following error:

NameError in 'Register Upgrade and upload a video flow should upload a
video'
uninitialized constant Watir::Element

I'm a newbie to watir so any help you can provide would be greatly
appericated.

Thanks

--~--~-~--~~~---~--~~
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: javascript popup handler times out if there is no pop up

2009-10-06 Thread iherebyresign

Thanks for the quick reply.

I've been trying to do something similar. Maybe I'm just not putting
things in the right places, because when I use begin and end with
rescue, my pop up never gets handled; it remains on the screen until
watir times out again.

Where would I insert the wait_until?
--~--~-~--~~~---~--~~
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: Can't seem to install watir on the MAC

2009-10-06 Thread Bret Pettichord

sudo gem install firewatir
sudo gem install safariwatir

On Oct 6, 1:28 pm, QAguy qablogm...@gmail.com wrote:
 When I try to install the watir gem on the mac I am getting the
 following:

 host73:watir_site_regression employee$ sudo gem install watir --
 include-dependencies
 INFO:  `gem install -y` is now default and will be removed
 INFO:  use --ignore-dependencies to install only the gems you list
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
         ERROR: Failed to build gem native extension.

 /opt/local/bin/ruby extconf.rb
 checking for strncpy_s()... no
 creating Makefile

 make
 /usr/bin/gcc-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -
 I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/
 include -fno-common -O2 -arch x86_64  -fno-common -pipe -fno-common  -
 arch x86_64 -c win32/api.c
 win32/api.c:2:21: error: windows.h: No such file or directory
 win32/api.c:33: error: expected specifier-qualifier-list before
 ‘HANDLE’
 win32/api.c: In function ‘api_free’:
 win32/api.c:40: error: ‘Win32API’ has no member named ‘library’
 win32/api.c:41: error: ‘Win32API’ has no member named ‘library’
 win32/api.c: At top level:
 win32/api.c:58: error: expected ‘)’ before ‘dwError’
 win32/api.c: In function ‘callback_init’:
 win32/api.c:186: error: ‘LPARAM’ undeclared (first use in this
 function)
 win32/api.c:186: error: (Each undeclared identifier is reported only
 once
 win32/api.c:186: error: for each function it appears in.)
 win32/api.c:186: error: expected ‘)’ before ‘find_callback’
 win32/api.c: In function ‘api_init’:
 win32/api.c:233: error: ‘HMODULE’ undeclared (first use in this
 function)
 win32/api.c:233: error: expected ‘;’ before ‘hLibrary’
 win32/api.c:234: error: ‘FARPROC’ undeclared (first use in this
 function)
 win32/api.c:234: error: expected ‘;’ before ‘fProc’
 win32/api.c:270: error: ‘hLibrary’ undeclared (first use in this
 function)
 win32/api.c:280: error: ‘Win32API’ has no member named ‘library’
 win32/api.c:287: error: ‘fProc’ undeclared (first use in this
 function)
 win32/api.c:330: error: ‘Win32API’ has no member named ‘function’
 win32/api.c:338: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:341: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:344: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:347: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:350: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:353: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:367: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:373: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:376: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:379: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:382: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:385: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c: In function ‘func_init’:
 win32/api.c:456: error: ‘Win32API’ has no member named ‘function’
 win32/api.c:456: error: ‘FARPROC’ undeclared (first use in this
 function)
 win32/api.c:464: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:467: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:470: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:473: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:476: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:479: error: ‘Win32API’ has no member named ‘prototype’
 win32/api.c:493: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:499: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:502: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:505: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:508: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c:511: error: ‘Win32API’ has no member named ‘return_type’
 win32/api.c: At top level:
 win32/api.c:528: error: expected specifier-qualifier-list before
 ‘DWORD’
 win32/api.c:532: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CallbackFunction’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
 ‘__attribute__’ before ‘CALLBACK’
 win32/api.c:690: error: expected ‘=’, ‘,’, 

[wtr-general] Re: Can't seem to install watir on the MAC

2009-10-06 Thread QAguy

Thanks for writing. I have those 2 installed already on my MAC:

safariwatir (0.3.3)
firewatir (1.6.2)

but a straight
sudo gem install watir fails. Is that gem not able to be installed on
the MAC?

Thanks

On Oct 6, 3:40 pm, Bret Pettichord bpettich...@gmail.com wrote:
 sudo gem install firewatir
 sudo gem install safariwatir

 On Oct 6, 1:28 pm, QAguy qablogm...@gmail.com wrote:

  When I try to install the watir gem on the mac I am getting the
  following:

  host73:watir_site_regression employee$ sudo gem install watir --
  include-dependencies
  INFO:  `gem install -y` is now default and will be removed
  INFO:  use --ignore-dependencies to install only the gems you list
  Building native extensions.  This could take a while...
  ERROR:  Error installing watir:
          ERROR: Failed to build gem native extension.

  /opt/local/bin/ruby extconf.rb
  checking for strncpy_s()... no
  creating Makefile

  make
  /usr/bin/gcc-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -
  I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/
  include -fno-common -O2 -arch x86_64  -fno-common -pipe -fno-common  -
  arch x86_64 -c win32/api.c
  win32/api.c:2:21: error: windows.h: No such file or directory
  win32/api.c:33: error: expected specifier-qualifier-list before
  ‘HANDLE’
  win32/api.c: In function ‘api_free’:
  win32/api.c:40: error: ‘Win32API’ has no member named ‘library’
  win32/api.c:41: error: ‘Win32API’ has no member named ‘library’
  win32/api.c: At top level:
  win32/api.c:58: error: expected ‘)’ before ‘dwError’
  win32/api.c: In function ‘callback_init’:
  win32/api.c:186: error: ‘LPARAM’ undeclared (first use in this
  function)
  win32/api.c:186: error: (Each undeclared identifier is reported only
  once
  win32/api.c:186: error: for each function it appears in.)
  win32/api.c:186: error: expected ‘)’ before ‘find_callback’
  win32/api.c: In function ‘api_init’:
  win32/api.c:233: error: ‘HMODULE’ undeclared (first use in this
  function)
  win32/api.c:233: error: expected ‘;’ before ‘hLibrary’
  win32/api.c:234: error: ‘FARPROC’ undeclared (first use in this
  function)
  win32/api.c:234: error: expected ‘;’ before ‘fProc’
  win32/api.c:270: error: ‘hLibrary’ undeclared (first use in this
  function)
  win32/api.c:280: error: ‘Win32API’ has no member named ‘library’
  win32/api.c:287: error: ‘fProc’ undeclared (first use in this
  function)
  win32/api.c:330: error: ‘Win32API’ has no member named ‘function’
  win32/api.c:338: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:341: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:344: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:347: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:350: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:353: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:367: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:373: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:376: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:379: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:382: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:385: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c: In function ‘func_init’:
  win32/api.c:456: error: ‘Win32API’ has no member named ‘function’
  win32/api.c:456: error: ‘FARPROC’ undeclared (first use in this
  function)
  win32/api.c:464: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:467: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:470: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:473: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:476: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:479: error: ‘Win32API’ has no member named ‘prototype’
  win32/api.c:493: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:499: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:502: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:505: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:508: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c:511: error: ‘Win32API’ has no member named ‘return_type’
  win32/api.c: At top level:
  win32/api.c:528: error: expected specifier-qualifier-list before
  ‘DWORD’
  win32/api.c:532: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
  ‘__attribute__’ before ‘CallbackFunction’
  win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
  ‘__attribute__’ before ‘CALLBACK’
  win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
  ‘__attribute__’ before ‘CALLBACK’
  win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
  ‘__attribute__’ before ‘CALLBACK’
  win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
  ‘__attribute__’ before ‘CALLBACK’
  win32/api.c:690: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 

[wtr-general] Watir require xxx error?

2009-10-06 Thread Andrew

Getting an error while starting up the program on this code where I am
extending SelectList (file name is watir_or.rb)

require 'rubygems'
require 'watir'
require 'win32ole'

module Watir

  class Picker  SelectList

# picker specific methods

  end
end

The error is

./watir_or.rb:8: uninitialized constant Watir::SelectList (NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from pcfparser.rb:1

So what would I have to 'require' to make this work?

Andy
--~--~-~--~~~---~--~~
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: Issue with .click when selecting via id

2009-10-06 Thread karim rayani

I donot know much of what you have done but for safari we need to have
safariwatir installed

require 'rubygems'
require 'safariwatir'

browser = Watir::Safari.new
browser.goto(http://google.com;)
browser.text_field(:name, q).set(obtiva)
browser.button(:name, btnI).click
puts FAILURE unless browser.contains_text(software)

if you could try the above script to check it things run smoothy? i
have never tried safari but this test is only to know if safariwatir
is working or not


On 10/6/09, QAguy qablogm...@gmail.com wrote:

 I am using rspec with safariwatir. When I try to have watir click a
 link for which I have an id I see the link get highlighted in yellow
 but the click action doesn't occur. Here is an example:

 @browser.button(:id, ID_name).click

 I then tried this:

 Watir::Element::click { @browser.button(:id, anonymous_element_1)}

 But this generates the following error:

 NameError in 'Register Upgrade and upload a video flow should upload a
 video'
 uninitialized constant Watir::Element

 I'm a newbie to watir so any help you can provide would be greatly
 appericated.

 Thanks

 


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