[wtr-general] Need help checking a box in a table in an iframe

2009-09-25 Thread rollo

I'm in need of some help getting to a checkbox element in a table (in
an iframe).  My trouble is that there are two check box elements that
are almost exactly the same.

Here is the HTML:

  input type=checkbox name=email value=cro...@point.com /
nbsp;rollo, c (cro...@point.com)br /
  input type=checkbox name=email value=cro...@point.com /
nbsp;rollo, c j (cro...@point.com)br /

Here is code that checks the first box:

browser.frame(:name,/admin_frame_*/).checkbox
(:name=email,:value=cro...@point.com).set

For the life of me, I can't get to the second check box.  I've tried
various things, including xpath and regex to isolate on the text but
its not coming clear.  Just lots of Unable to locate element
results.  Any suggestions?

Cheers.
~rollo
--~--~-~--~~~---~--~~
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: Need help checking a box in a table in an iframe

2009-09-25 Thread rollo

I should add that I know the text is on the page...

irb(main):059:0 browser.frame(:name,/
admin_frame_*/).text.include?'rollo, c j'
= true

Thanks.
On Sep 24, 11:00 pm, rollo croll...@gmail.com wrote:
 I'm in need of some help getting to a checkbox element in a table (in
 an iframe).  My trouble is that there are two check box elements that
 are almost exactly the same.

 Here is the HTML:

   input type=checkbox name=email value=cro...@point.com /nbsp;rollo, 
 c (cro...@point.com)br /

   input type=checkbox name=email value=cro...@point.com /

 nbsp;rollo, c j (cro...@point.com)br /

 Here is code that checks the first box:

         browser.frame(:name,/admin_frame_*/).checkbox
 (:name=email,:value=cro...@point.com).set

 For the life of me, I can't get to the second check box.  I've tried
 various things, including xpath and regex to isolate on the text but
 its not coming clear.  Just lots of Unable to locate element
 results.  Any suggestions?

 Cheers.
 ~rollo
--~--~-~--~~~---~--~~
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: Mac FireWatir PopUp

2009-09-25 Thread Angrez Singh
What behaviour are you seeing? As per the pop up handling in Firewatir. Pop
up will not show but whatever action you have written for OK or CANCEL
button will happen.

Thanks,
Angrez

On Thu, Sep 24, 2009 at 8:48 PM, Brad bradask...@gmail.com wrote:


 I saw another thread about handling popups in FireWatir, but I didn't
 see a resolution.

 Please see the dialog box I'm trying to handle
 http://sites.google.com/site/watirattachments/

 because if this is suppose to work...it isn't

 @browser.startClicker(Cancel)
 @browser.button(:caption, Agree and Download).click

 I looked at the unittests and see that it works for the second image
 on this page
 http://sites.google.com/site/watirattachments/

 Thanks for any help.

 Brad
 


--~--~-~--~~~---~--~~
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: Need help checking a box in a table in an iframe

2009-09-25 Thread Ankur Gera
Hi Rollo,

In these kind of situations you can use xpath also bcz there can any number
of elements whose html will seems to be similar.

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] Not able to click on a TD through Watir, though manually it is possible

2009-09-25 Thread Isabel

I have a calendar using which I can set the date in the given text
area. For
this I need to click on a calendar icon and choose dates(by clicking
on them) from the calendar that pops up. When I click on close on the
calendar, the selected dates get set in the text area. now the problem
is that .click apparently has no effect on the date which is a table
cell and there seems to be no known JavaScript event that has been
applied on it.

the code for the calendar is as below:-
TABLE cellSpacing=0 cellPadding=0 unselectable=trueTHEAD
unselectable=trueTR unselectable=trueTD class=title
unselectable=true navtype=400 ttip=About the calendar /TDTD
class=title style=CURSOR: move colSpan=5 unselectable=true
navtype=300 ttip=Drag to moveJanuary, 2011/TDTD class=title
unselectable=true navtype=200 ttip=Closeclose/TD/TRTR
unselectable=true/TR/THEADTHEAD unselectable=trueTR
class=daynames unselectable=trueTD class=name day  weekend
unselectable=truenbsp;nbsp; S/TDTD class= day name
unselectable=true navtype=100 ttip=Display Monday first
fdow=1nbsp;nbsp; M/TDTD class=name day  unselectable=true
navtype=100 ttip=Display Tuesday first fdow=2nbsp;nbsp; T/
TDTD class=name day  unselectable=true navtype=100
ttip=Display Wednesday first fdow=3nbsp;nbsp; W/TDTD class=
day name unselectable=true navtype=100 ttip=Display Thursday
first fdow=4nbsp;nbsp; T/TDTD class=name day 
unselectable=true navtype=100 ttip=Display Friday first
fdow=5nbsp;nbsp; F/TDTD class=name day  weekend
unselectable=true navtype=100 ttip=Display Saturday first
fdow=6nbsp;nbsp; S/TD/TR/THEADTBODY
unselectable=trueTR class=daysrow unselectable=trueTD class=
day disabled unselectable=true otherMonth=truePnbsp;/P/
TDTD class= day disabled unselectable=true
otherMonth=truePnbsp;/P/TDTD class= day disabled
unselectable=true otherMonth=truePnbsp;/P/TDTD class=
day disabled unselectable=true otherMonth=truePnbsp;/P/
TDTD class= day disabled unselectable=true
otherMonth=truePnbsp;/P/TDTD class= day disabled
unselectable=true otherMonth=truePnbsp;/P/TDTD
class=weekend false day  unselectable=true ttip=_
otherMonth=false1/TD/TRTR class=daysrow
unselectable=trueTD class= day false weekend unselectable=true
ttip=_ otherMonth=false2/TDTD class= day false
unselectable=true ttip=_ otherMonth=false3/TDTD class= day
false unselectable=true ttip=_ otherMonth=false4/TDTD
class= day false unselectable=true ttip=_ otherMonth=false5/
TDTD class= day false unselectable=true ttip=_
otherMonth=false6/TDTD class= day false unselectable=true
ttip=_ otherMonth=false7/TDTD class=weekend false day 
unselectable=true ttip=_ otherMonth=false8/TD/TRTR
class=daysrow unselectable=trueTD class= day false weekend
unselectable=true ttip=_ otherMonth=false9/TDTD class= day
false unselectable=true ttip=_ otherMonth=false10/TDTD
class= day false unselectable=true ttip=_
otherMonth=false11/
TDTD class=false day  selected unselectable=true ttip=_
otherMonth=false12/TDTD class=false day  unselectable=true
ttip=_ otherMonth=false13/TDTD class=selected  day false
unselectable=true ttip=_ otherMonth=false14/TDTD class= day
false weekend unselectable=true ttip=_ otherMonth=false15/
TD/TRTR class=daysrow unselectable=trueTD class= day false
weekend unselectable=true ttip=_ otherMonth=false16/TDTD
class= day false unselectable=true ttip=_
otherMonth=false17/
TDTD class= day false unselectable=true ttip=_
otherMonth=false18/TDTD class= day false unselectable=true
ttip=_ otherMonth=false19/TDTD class= day false
unselectable=true ttip=_ otherMonth=false20/TDTD class= day
false unselectable=true ttip=_ otherMonth=false21/TDTD
class= day false weekend unselectable=true ttip=_
otherMonth=false22/TD/TRTR class=daysrow
unselectable=trueTD class= day false weekend unselectable=true
ttip=_ otherMonth=false23/TDTD class= day false
unselectable=true ttip=_ otherMonth=false24/TDTD class= day
false unselectable=true ttip=_ otherMonth=false25/TDTD
class= day false unselectable=true ttip=_
otherMonth=false26/
TDTD class= day false unselectable=true ttip=_
otherMonth=false27/TDTD class= day false unselectable=true
ttip=_ otherMonth=false28/TDTD class= day false weekend
unselectable=true ttip=_ otherMonth=false29/TD/TRTR
class=daysrow unselectable=trueTD class= day false weekend
unselectable=true ttip=_ otherMonth=false30/TDTD class= day
false unselectable=true ttip=_ otherMonth=false31/TDTD
class= day disabled unselectable=true
otherMonth=truePnbsp;/
P/TDTD class= day disabled unselectable=true
otherMonth=truePnbsp;/P/TDTD class= day disabled
unselectable=true otherMonth=truePnbsp;/P/TDTD class=
day disabled unselectable=true otherMonth=truePnbsp;/P/
TDTD class= day disabled unselectable=true
otherMonth=truePnbsp;/P/TD/TR/TBODYTFOOT
unselectable=trueTR class=footrow unselectable=trueTD
class=ttip style=CURSOR: move colSpan=7 unselectable=true
navtype=300 ttip=Drag to moveSelect date/TD/TR/TFOOT/
TABLE


Please help...
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message 

[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-25 Thread Željko Filipin
This clicked the second chckbox for me:

browser.frame(:name,/admin_frame_*/).checkbox(:name=email, :value=
cro...@point.com, :index= 2).set

http://wiki.openqa.org/display/WTR/Multiple+Attributes

Željko
--
http://watirpodcast.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: Not able to click on a TD through Watir, though manually it is possible

2009-09-25 Thread Željko Filipin
On Fri, Sep 25, 2009 at 9:15 AM, Isabel joybe...@gmail.com wrote:
 .click apparently has no effect on the date which is a table
 cell and there seems to be no known JavaScript event that has been
 applied on it.

Can you ask a developer which event should be fired?

Željko
--
http://watirpodcast.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: hi there is an issue in running my script

2009-09-25 Thread sathish_Er

Hi

please check the url to view the screen shot,

Thanks
Sathish


On Sep 24, 2:59 pm, kiran yajamanyam kiranyajaman...@gmail.com
wrote:
 No screen shot is available. Can you resend it?

 On Thu, Sep 24, 2009 at 1:12 PM, sathish_Er vpm.sath...@gmail.com wrote:

  I am using ruby 1.8.5 for developing a script to automate the process
  to record the response time ,

  On executing the script in Scite i found the error attached the screen
  shot for your review, kindly give your comments

  --
  Thanks Regards
  Sathish Kumar
--~--~-~--~~~---~--~~
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: hi there is an issue in running my script

2009-09-25 Thread sathish_Er

Hi ,.

please check the below url for the screen shot ,

http://picasaweb.google.co.in/lh/sredir?uname=vpm.sathishtarget=PHOTOid=5385306014125370882aid=5385305979559747921locked=trueauthkey=Gv1sRgCN_8sKbg7obCAgfeat=email

Thanks
Sathish

On Sep 24, 2:59 pm, kiran yajamanyam kiranyajaman...@gmail.com
wrote:
 No screen shot is available. Can you resend it?

 On Thu, Sep 24, 2009 at 1:12 PM, sathish_Er vpm.sath...@gmail.com wrote:

  I am using ruby 1.8.5 for developing a script to automate the process
  to record the response time ,

  On executing the script in Scite i found the error attached the screen
  shot for your review, kindly give your comments

  --
  Thanks Regards
  Sathish Kumar
--~--~-~--~~~---~--~~
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] xpath

2009-09-25 Thread Željko Filipin
I have html like this:

h1 id=headerHeader/h1

This works:

browser.h1(:xpath, //h...@id='header']).flash
browser.h1(:id, header).flash

But this returns:

browser.element_by_xpath(//h...@id='header']).flash

returns:

WIN32OLERuntimeError: unknown property or method `flash'
HRESULT error code:0x80020006
  Unknown name.
from (irb):12:in `method_missing'
from (irb):12

Anybody knows what I did wrong?

Željko
--
http://watirpodcast.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: xpath

2009-09-25 Thread Angrez Singh
Couple of things to remember while using XPath:
1. element(:xpath, [xpath]) returns you Watir Element which contains flash
method
2. element_by_xpath(xpath) is a method which is used only for the elements
which are not supported by Watir. It returns you the underlying ole_object
which doesn't contains flash method, hence the error.

Hope I am clear enough here. Let me know if you need more explanation on
this.

Thanks
Angrez

On Fri, Sep 25, 2009 at 4:10 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 I have html like this:

 h1 id=headerHeader/h1

 This works:

 browser.h1(:xpath, //h...@id='header']).flash
 browser.h1(:id, header).flash

 But this returns:

 browser.element_by_xpath(//h...@id='header']).flash

 returns:

 WIN32OLERuntimeError: unknown property or method `flash'
 HRESULT error code:0x80020006
   Unknown name.
 from (irb):12:in `method_missing'
 from (irb):12

 Anybody knows what I did wrong?

 Željko
 --
 http://watirpodcast.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] Get the error when try to run the watir code in Mac

2009-09-25 Thread yuping zhong

Dear All,

I try to run the watir code in my Mac and get the error. I already
install the firewatir,update the system gem and JSSH FireFox Extension
successfully.

Here is the code:
===
require rubygems
require firewatir

$browser=Watir::Browser.new

$browser.goto www.google.com

$browser.text_field(:name,q).set(watir)

$browser.button(:value,Google Search).click
=

Then get the error as following:

dyld: Library not loaded: /usr/lib/libsqlite3.dylib
  Referenced from: /System/Library/Frameworks/Security.framework/
Versions/A/Security
  Reason: Incompatible library version: Security requires version
9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
/Applications/Firefox.app/Contents/MacOS/run-mozilla.sh: line 131:
573 Trace/BPT trap  $prog ${1+$@}
/usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
firefox.rb:271:in `set_defaults': Unable to connect to machine :
127.0.0.1 on port 9997. Make sure that JSSh is properly installed and
Firefox is running with '-jssh' option
(Watir::Exception::UnableToStartJSShException)
from /usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
firefox.rb:161:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'
from test_firefox_mac.rb:4



Bt the way,when the error appears,then pop up a window with the text:
firefox-bin quit unexpectedly.
Click Reopen to open the application again. Click Report to see more
detail information and send a report to Apple.

What is the problem of this?
Any help will be very appreciated!
Many 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: xpath

2009-09-25 Thread Angrez Singh
Refer this for the properties/methods for the underlying ole_element:
http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx

Each element is having different set of properties/elements you can check
the type of element and then see the corresponding element in the above
list.

- Angrez

On Fri, Sep 25, 2009 at 5:18 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 On Fri, Sep 25, 2009 at 1:19 PM, Angrez Singh ang...@gmail.com wrote:
  2. element_by_xpath(xpath) is a method which is used only for the
 elements which are not supported by Watir. It returns you the underlying
 ole_object which doesn't contains flash method, hence the error.

 What can I do with ole_object? How do I click it? Or flash it? I have
 searched for documentation, but I have not found anything useful so far.

 Ž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: Mac FireWatir PopUp

2009-09-25 Thread Brad

Hi Angrez,

What I'm seeing is the pop dialog, which is a download dialog is not
clicked on i.e. it is not dismisses.

If I understand the code correctly you say what you want to happen to
the dialog first and then click on the link which popups the dialog
and then your first action happens, correct?

I different I see is in the example the JavaScript dialog box come
down out of the browser and the popup handler works.  My dialog is
free floating modal dialog.

Any suggestions?

Thanks.

Brad

On Sep 25, 1:24 am, Angrez Singh ang...@gmail.com wrote:
 What behaviour are you seeing? As per the pop up handling in Firewatir. Pop
 up will not show but whatever action you have written for OK or CANCEL
 button will happen.

 Thanks,
 Angrez

 On Thu, Sep 24, 2009 at 8:48 PM, Brad bradask...@gmail.com wrote:

  I saw another thread about handling popups in FireWatir, but I didn't
  see a resolution.

  Please see the dialog box I'm trying to handle
 http://sites.google.com/site/watirattachments/

  because if this is suppose to work...it isn't

  @browser.startClicker(Cancel)
  @browser.button(:caption, Agree and Download).click

  I looked at the unittests and see that it works for the second image
  on this page
 http://sites.google.com/site/watirattachments/

  Thanks for any help.

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

2009-09-25 Thread Željko Filipin
On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh ang...@gmail.com wrote:
 http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx

Thanks Angrez, I have found click method.

Ž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: Need help checking a box in a table in an iframe

2009-09-25 Thread rollo

Greetings.  desiring to make the question more coherent, I left out
the fact that there are 4 accounts that only differ in the Text
attribute.  In addition, the accounts are non-consecutive and the
order is arbitrary.  So, while :index would work on this specific
dataset, I can't be guaranteed that the order/number of email accounts
remains the same.  To get through the current sprint, I chose a brute
force method (select all addresses), which also covers a secondary
issue I'm testing.  So, I've a solution for now.  I'll revisit the
xpath option, though it didn't work when i tried initially and I don't
believe its supported for frames/iframes, which is where this table
lives.

If anyone has additional solutions, I'd be happy to try and report
back.

Thanks.

On Sep 25, 12:41 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 This clicked the second chckbox for me:

 browser.frame(:name,/admin_frame_*/).checkbox(:name=email, :value=
 cro...@point.com, :index= 2).set

 http://wiki.openqa.org/display/WTR/Multiple+Attributes

 Željko
 --http://watirpodcast.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: How to handle Exceptions in Watir

2009-09-25 Thread Mark Anderson

I'm sorry but I still don't have enough information.

So somewhere in your code, you are looking for something with a text
attribute of Return to Previous Page and watir is telling you that it does
not exist.  What do you want the program to do if it isn't found?  What have
you tried?

  /\/\ark

 -Original Message-
 From: watir-general@googlegroups.com [mailto:watir-
 gene...@googlegroups.com] On Behalf Of Vishal
 Sent: Wednesday, September 23, 2009 7:29 AM
 To: Watir General
 Subject: [wtr-general] Re: How to handle Exceptions in Watir
 
 
 I am getting the following error
 d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_ex
 ists': Unable to locate element, using :text, Return to Previous
 Page (Watir::
 Exception::UnknownObjectException)
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284
 :in `enabled?'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:
 in `assert_enabled'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:229
 :in `click!'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:215
 :in `click'
 
 
 
 On Sep 17, 9:19 pm, Mark Anderson mander...@drillinginfo.com
 wrote:
  What exception are you seeing?  What would you like to do when you
 encounter
  it?  Without more information, it will be hard to give you more than
 basic
  information about exception handling.
 
  Here is the link to a page about ruby exception handling that I refer to
  when working in this
 area:http://ruby.activeventure.com/usersguide/rg/rescue.html
 
                                  /\/\ark
 
 
 
 
 
   -Original Message-
   From: watir-general@googlegroups.com [mailto:watir-
   gene...@googlegroups.com] On Behalf Of Vishal
   Sent: Thursday, September 17, 2009 2:02 AM
   To: Watir General
   Subject: [wtr-general] How to handle Exceptions in Watir
 
   While running the testcase in Watir  if an Exception is encountered, I
   program quits at that point.
   How can we handle exception in Watir
 
   Thanks,
   Vishal
 
   __ Information from ESET NOD32 Antivirus, version of virus
   signature database 4432 (20090917) __
 
   The message was checked by ESET NOD32 Antivirus.
 
  http://www.eset.com
 
   __ Information from ESET NOD32 Antivirus, version of virus
   signature database 4434 (20090917) __
 
   The message was checked by ESET NOD32 Antivirus.
 
  http://www.eset.com
 
  __ Information from ESET NOD32 Antivirus, version of virus
 signature
  database 4434 (20090917) __
 
  The message was checked by ESET NOD32 Antivirus.
 
  http://www.eset.com- Hide quoted text -
 
  - Show quoted text -
  
 
 
 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 4449 (20090923) __
 
 The message was checked by ESET NOD32 Antivirus.
 
 http://www.eset.com
 
 
 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 4458 (20090925) __
 
 The message was checked by ESET NOD32 Antivirus.
 
 http://www.eset.com
 
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4458 (20090925) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.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] Watir cannot connect to IE running und er non-Admin account on ‘default’ desktop.

2009-09-25 Thread Shane

Some Background on architecture of the app is needed:

Windows 2003/Apache-v2.2/IE7/Watir-v1.6.2/Ruby-v1.8.5

   1. Apache running under 'localsystem' account.
   2. Request to run a Watir script comes in.
   3. Apache CGI kicks off IE7 under a particular user, e.g. 'tester',
and attaches the IE7 window to the default desktop environment. This
allows us to VNC into the machine and see all IE7 windows from all the
accounts running.
   4. IE7 has ruby embedded into the process through plugin and
executes the ruby script in a thread.

For clicking on links/buttons in IE, Watir supplies a synchronous
'click' method and async 'click_no_wait' method. 'click_no_wait'
spawns a completely new ruby process to connect back to the IE7 window
to click the link/button.

This is what is failing for me. Since click_no_wait is spawning a new
process. It cannot seem to see the IE7 window to connect to it and
click on the link/button. I have to use 'click_no_wait' due to a
dialog box that IE pops up on a certain page, so that another ruby
thread can close it.

I've tried a few things:
- using fire_event('OnClick') instead of click_no_wait hangs script
like 'click' would.
- Modifying 'click' by commenting out '@container.wait', but the
'click!' itself is the API that hangs waiting for the dialog box to
close.
- Make 'click_no_wait' spawn a new thread instead of a process', but
other threads appear to be suspended while the 'click!' call executes
in that thread. Which is strange.
- Executing the 'click_no_wait' process using the exact same code that
is used to spawn the IE7 process, but it still can't find any IE7
windows.

By 'default' desktop described above, the code that spawns IE
basically does a series of C++ calls to attach the IE7 window to the
'winsta0' desktop:

- LogonUser() // log in as tester account
- OpenWindowStation(winsta0) // to get default desktop
- SetProcessWindowStation()
- // add the user to interactive window station using
(GetUserObjectSecurity, GetSecurityDescriptorDacl, GetAclInformation,
AddAce, SetSecurityDescriptorDacl, SetUserObjectSecurity)
- // add user to default desktop using APIs listed above.
- CreateEnvironmentBlock
- ImpersonateLoggedOnUser
- CreateProcessAsUser('iexplore.exe')
- // cleanup

Running the following Watir script under the particular user IE7 is
running under yields:

$IE = Watir::IE.attach(:title, /Google/)
$IE.button(:name, 'btnG').click!

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
246:in `method_missing': Windows (WIN32OLERuntimeError) OLE error code:
80040154 in HRESULT error code:0x80020009 Exception occurred. from c:/
ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:246:in
each

Which contains:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:246
shell = WIN32OLE.new(Shell.Application)
windows = shell.Windows   ## Fails here

Let me know if I can supply more details or disambiguation! :)

Thanks, Shane.

--~--~-~--~~~---~--~~
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] How do you change default timeout for Safari Watir? I keep getting Timed out after 10 seconds.

2009-09-25 Thread matt22

I can see where this is being generated in the code, but I cannot
figure out how the default timeout values are set.  I am doing pretty
simple stuff:

  @browser = Watir::Safari
  @browser.goto url
  @browser.text_field(:name, q).set query
  @browser.button(:name, btnG).click

Any help would be 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: Get the error when try to run the watir code in Mac

2009-09-25 Thread Rafael Fonseca
Try running this on Terminal:
mv /Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib
/Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib.orig
*
*
*cp /usr/lib/libsqlite3.dylib
/Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib*
*
*
***Worked for me.
*--
Rafael Fonseca
www.nunca.com.br


2009/9/25 yuping zhong littlezhong...@gmail.com

 libsqlite3.dylib

--~--~-~--~~~---~--~~
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] how to handle an immediate popup

2009-09-25 Thread Darryl (gem dandy) Brown

Our test team is facing an interesting challenge with a popup. The web
server that we are testing has a password
protected mode wherein when the url is accessed, there is an immediate
login popup. There is no opportunity to use a click_no_wait as there
are no buttons to click - the first thing that appears is the popup.

It's like we need a ie.goto 'test_site'.no_wait command.

Thanks in advance for any insight on this.

Darryl
--~--~-~--~~~---~--~~
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 handle an immediate popup

2009-09-25 Thread Darryl Brown

Hello All,

I continued digging and found the solution:

http://wiki.openqa.org/display/WTR/Basic+Authentication


require watir
require 'watir/ie'


Watir::Browser.default='ie'
browser=Watir::Browser.new
url = http://www.someplace.com;

Thread.new{
  sleep(1)  # put appropriate sleep time
Watir.autoit.WinWait('Connect to ')
Watir.autoit.Send('myusername')
Watir.autoit.Send('{TAB}')
Watir.autoit.Send('mypassword')
Watir.autoit.Send('{ENTER}')
}
browser.goto(url)


This was added since I last studied this page.

Darryl



On Sep 25, 8:30 pm, Darryl (gem dandy) Brown d-l-
br...@roadrunner.com wrote:
 Our test team is facing an interesting challenge with a popup. The web
 server that we are testing has a password
 protected mode wherein when the url is accessed, there is an immediate
 login popup. There is no opportunity to use a click_no_wait as there
 are no buttons to click - the first thing that appears is the popup.

 It's like we need a ie.goto 'test_site'.no_wait command.

 Thanks in advance for any insight on this.

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

2009-09-25 Thread Wesley Chen
Hi, Zeljko,
So, would you please show the click method here?
How to flash or click after element_by_xpath method?
Thanks.
Wesley Chen.
The easier, the better.


On Fri, Sep 25, 2009 at 10:34 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh ang...@gmail.com wrote:
  http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx

 Thanks Angrez, I have found click method.


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