[wtr-general] Select from auto-complete

2009-04-27 Thread Hemalatha Sivasubramaniam
I have a select field, that acts both as auto-complete and select box, i'm
not able to set value in that field using watir script. The HTML code for
that select field is below,

input class=dojoComboBox type=text
dojoattachpoint=textInputNode dojoattachevent=key:_handleKeyEvents;
keyUp: onKeyUp; compositionEnd; onResize; autocomplete=off style=/
img class=dojoComboBox hspace=0 vspace=0
src=/eglcms/struts/dojo/src/widget/templates/images/combo_box_arrow.png
dojoattachevent=onMouseUp:
handleArrowClick; onResize; dojoattachpoint=downArrowNode style=width:
14px; height: 14px;/
and when i type in something (say letter T), i should be able to select
from the list that appears like this

span class=dojoComboBoxOptions style=position: absolute; width: 140px;
height: 32px; z-index: 1001; left: 325px; top: 702px; opacity: 0; display:
none;  div class=dojoComboBoxItem dojoComboBoxItemEven resultname=T
MATHI resultvalue=3
 b class=T MATHI/b
/div
 div class=dojoComboBoxItem dojoComboBoxItemOdd resultname=T BABU
resultvalue=22T BABU/div
/span

If i have to select the first or the second option, How should i be doing it
in watir?

I have tried firing the events, but the list doesn't appear. I have the
watir script code below:

browser2.text_field(:class,dojoComboBox).focus()
browser2.text_field(:class,dojoComboBox).set T
browser2.text_field(:class,dojoComboBox).fire_event('onblur')
Watir::Waiter.wait_until
{browser2.span(:class,dojoComboBoxOptions).div(:text,/t mathi/).exists?}
browser2.div(:class,formmainbox).span(:class,dojoComboBoxOptions).div(:text,/t
mathi/).click

I get an error at the wait until where the operation times out.
I have tried the script using Watir 1.6.2, Ruby 1.8.26 using both Firefox
3.0 and IE 7.0

Any solution would be helpful.

Regards,
Hema

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



[wtr-general] Re: Unable to click an element in table/grid

2009-04-27 Thread Shweta

Hi

I tried with all those methods it does nothing.My script stops without
any error

On Apr 27, 10:30 am, Vishal bvkon...@gmail.com wrote:
 Try

 ie.table.fire_event(onmousedown)
 ie.table.fire_event(onmouseup)
 ie.table.fire_event(onclick)

 On Apr 27, 10:19 am, Shweta nagman...@gmail.com wrote:



  Hi
  In my application after i search for an id from serach page it
  displays the result in a grid/table,There i need to click on the
  result.later it navigates to other page there i need to perform the
  actions.

  I used something like this code:

  ie.table(:index,1).click

  It dint work out.

  Can anyone suggest solution for this

  html code is like this:

  ONCLICK=window.location='/VBU/market/viewid.do?Id=13133';

  STYLE='cursor:hand;backgroundColor:white'

  ONMOUSEOVER=this.style.backgroundColor='#BC9898';

  ONMOUSEOUT=this.style.backgroundColor='white';

  td 

  John

  /td

  td 

  132133

  /td

  td 

  QS

  /td

  td 

  N

  /td

  td 

  N/A

  /td

  td 

  Smith

  /td

  td 

  AR

  /td

  td 

  John Marketing brokers

  /td

  td nowrap 

  $123,456

  /td

  td nowrap 

  04-23-09

  /td

  td nowrap 

  04-24-09

  /td

  td 

  /td

  td 

  ABCD 4343

  /td

  /tr

                                                              /table

                                                  /td

                                      /tr

                                      tr

                                                  td colspan=4

                                                              br

                                                  /td

                                      /tr

                                      tr

                                                  td

                                                              table
  border=0 width=100% cellpadding=2 cellspacing=2- Hide quoted text -

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



[wtr-general] Re: show form select_list objects text

2009-04-27 Thread jason

Thanks for the suggestion.
unfortunately it dont work :-(

 contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects

returns a empty string.




On 26 Apr., 00:21, George george.sand...@gmail.com wrote:
 Hi there,

 If you're looking to get all the options in a select list and put it
 into an array, you can use this:

 contents = ff.form(:index, 1).select_list[1].getAllObjects

 -George

 On Apr 25, 1:25 pm, jason jason.franklin.sto...@gmail.com wrote:

  I have looked around and found no love on this subject.

  I would like to discover the text of a forms select list - is this
  at all possible?

  i.e

  ff.form(:index, 1).select_list[1].each do |option|
   puts option.inspect
  end

  Results in this output - but does not include the text in the option:
  option value=100Hello/option

  name:
  type:
  id:
  value:        100
  disabled:     false

  It would have though that the following would work:

  ff.form(:index, 1).select_list[1].each do |option|
   puts option.text #or
   puts option.inner_text
  end

  but - no love.

  any ideas would be very highly appreciated.

  Thanks a million.
--~--~-~--~~~---~--~~
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: show form select_list objects text

2009-04-27 Thread jason

Ah

getAllContents

Thanks!!
works.

On 27 Apr., 10:11, jason jason.franklin.sto...@gmail.com wrote:
 Thanks for the suggestion.
 unfortunately it dont work :-(

  contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects

 returns a empty string.

 On 26 Apr., 00:21, George george.sand...@gmail.com wrote:

  Hi there,

  If you're looking to get all the options in a select list and put it
  into an array, you can use this:

  contents = ff.form(:index, 1).select_list[1].getAllObjects

  -George

  On Apr 25, 1:25 pm, jason jason.franklin.sto...@gmail.com wrote:

   I have looked around and found no love on this subject.

   I would like to discover the text of a forms select list - is this
   at all possible?

   i.e

   ff.form(:index, 1).select_list[1].each do |option|
    puts option.inspect
   end

   Results in this output - but does not include the text in the option:
   option value=100Hello/option

   name:
   type:
   id:
   value:        100
   disabled:     false

   It would have though that the following would work:

   ff.form(:index, 1).select_list[1].each do |option|
    puts option.text #or
    puts option.inner_text
   end

   but - no love.

   any ideas would be very highly appreciated.

   Thanks a million.
--~--~-~--~~~---~--~~
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 call a function fom Excel ?

2009-04-27 Thread Wilson Xu
The following method maybe help you.
*eval * eval( *aString* *[*, *aBinding* *[* *file* *[* *line* *]* *]* *]*)
- *anObject*
 Evaluates the Ruby expression(s) in *aString*. If *aBinding* is given, the
evaluation is performed in its context. The binding may be a Binding object
or a Proc object. If the optional *file* and *line* parameters are present,
they will be used when reporting syntax errors.

Wilson

On Sat, Apr 25, 2009 at 11:47 PM, sHiVa krapa.ph...@gmail.com wrote:


 Hi all,

 I would like to manage my test suite in excel sheet. I put all of my
 function calls in  excel.
 when i call a functions from excel sheet that is a string type.  How
 can i execute that funtion at runtime?

 Regards
 Siva Paneendra krapa
 


--~--~-~--~~~---~--~~
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 select from a Dojo Select Widget

2009-04-27 Thread pallavi shashidhar
Found a work around for this,
Since there is a downarrow image that fires an event, that needs to be
triggered. so my code goes like this:
browser2.text_field(:class,dojoComboBox).focus()
browser2.text_field(:class,dojoComboBox).set T
browser2.text_field(:class,dojoComboBox).fire_event('onkeyup')
browser2.image(:class,dojoComboBox).fire_event('onmouseup')
browser2.div(:text,/T MATHI/).click
browser2.text_field(:class,dojoComboBox).fire_event('onfocus')

It also involves firing the correct event.


2009/4/24 pallavi shashidhar pals.sha...@gmail.com

 Hi there,
 I have a Dojo select widget with the HTML like;

 input class=dojoComboBox type=text dojoattachpoint=textInputNode
 dojoattachevent=key:_handleKeyEvents; keyUp: onKeyUp; compositionEnd;
 onResize; autocomplete=off style=/
 img class=dojoComboBox hspace=0 vspace=0 src=
 /eglcms/struts/dojo/src/widget/templates/images/combo_box_arrow.png
 dojoattachevent=onMouseUp: handleArrowClick; onResize; dojoattachpoint=
 downArrowNode style=width: 14px; height: 14px;/

 and when i type in something (say letter T), i should be able to select
 from the list that appears like this

 span class=dojoComboBoxOptions style=position: absolute; width: 140px;
 height: 32px; z-index: 1001; left: 325px; top: 702px; opacity: 0; display:
 none; div class=dojoComboBoxItem dojoComboBoxItemEven resultname=T
 MATHI resultvalue=3
 b class=T MATHI/b
 /div
 div class=dojoComboBoxItem dojoComboBoxItemOdd resultname=T BABU
 resultvalue=22T BABU/div
 /span

 If i have to select the first or the second option, How should i be doing
 it in watir?

 I have tried firing the events, but the list doesn't appear. I have the
 watir script code below:

 browser2.text_field(:class,dojoComboBox).focus()
 browser2.text_field(:class,dojoComboBox).set T
 browser2.text_field(:class,dojoComboBox).fire_event('onblur')
 Watir::Waiter.wait_until
 {browser2.span(:class,dojoComboBoxOptions).div(:text,/t mathi/).exists?}
 browser2.div(:class,formmainbox).span(:class,dojoComboBoxOptions).div(:text,/t
 mathi/).click

 I get an error at the wait until where the operation times out.
 I have tried the script using Watir 1.6.2, Ruby 1.8.26 using both Firefox
 3.0 and IE 7.0

 Any solution would be helpful.

 Regards,
 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: problem with fill fields on a login page (maybe frame problem)

2009-04-27 Thread Alexander Fedtke
Thanks for tip i got the result.
I just created a new user under windows and i qorks - strange so now i am
using another user and the script works.

But now i have the problem using the login button ( go button)

i try as  src:

# the Watir controller
require watir

# set a variable
test_site = https://www.go3-stage.engelvoelkers.com/dGPS3.pre/default.jsp;

# open the IE browser
ie = Watir::IE.new

# print some comments
puts Beginning of test: Google search.

puts  Step 1: go to the test site:  + test_site

ie.goto test_site

puts  Step 2.1: enter 'login=testauto' in the  text field.

ie.frame(:name, frmEngineLogin).text_field(:id, inputUid).set testauto

puts  Step 2.2: enter Password=123456.

ie.frame(:name, frmEngineLogin).text_field(:id, inputPwd).set 123456

puts  Step 3: Press Login Button 

ie.frame(:name, frmEngineLogin).button(:src, /go/).click

-
i try as with the title

ie.frame(:name, frmEngineLogin).button(:title, Login).click

-
Also not working-... any idea what i missing?

Via the ie developers toolbar is see that it is the same frame as username
and password. So what is missing?

--~--~-~--~~~---~--~~
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] Excel Data Driven Harness with Database Verifications

2009-04-27 Thread lokesh.agra...@gmail.com

Hi All,

I am using Excel Data Driven Harness with Database Verifications as
framework in my project.
http://wiki.openqa.org/display/WTR/Excel+Data+Driven+Harness+with+Database+Verifications

There is one xsl sheet (transform-results.xsl)to convert xml report to
HTML report. I don't like that report.

is there any other way to generate report in HTML file with this
framework or there is any other stylesheet (more pretty) which I can
use?


Thanks in advance for your help.



Thanks and Regards,
Lokesh Agrawal


--~--~-~--~~~---~--~~
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 i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh

I need to check all the ads/images present on the webpage.They all are
coming from different locations,need to verify ,all images are loading
fine,no 404/302 error, also need to check the magic no is coming
correctly for that image.


you can use http://fanhouse.com as a input url.



Thanks,

Yogesh

--~--~-~--~~~---~--~~
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] setting browser through rake

2009-04-27 Thread aidy lewis

Hi,

Has anyone managed to set the browser through Rake?


rake
require 'cucumber/rake/task'
require 'watir'


Cucumber::Rake::Task.new(default, features) do |t|
  t.cucumber_opts = -f TeamCityFormatter -f html --out story-results.html
end

task :ff do
  ENV['ENVIRONMENT']='systest'
  Watir::Browser.default = 'firefox'
  Rake.application[default].execute
end

task :ie do
  ENV['ENVIRONMENT']='systest'
  Watir::Browser.default = 'ie'
  Rake.application[default].execute
end
/rake

CI
rake ie
rake ff
/CI

As I get the default browser of Firefox, for both of the above commands.

Thanks
-- 
Aidy
blog: www.agiletester.co.uk
twitter: http://twitter.com/aidy_lewis

--~--~-~--~~~---~--~~
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: problem with fill fields on a login page (maybe frame problem)

2009-04-27 Thread deralex

found myself via the Watir WebRecorder out the the right line is:

ie.frame(:index, 53).image(:index, 4).click

- so okay with
ie.show_frames { |t| puts t.to_s }
 i can identify the frame 53 but how i can see the image index?


On 27 Apr., 12:35, Alexander Fedtke alexander.fed...@googlemail.com
wrote:
 Thanks for tip i got the result.
 I just created a new user under windows and i qorks - strange so now i am
 using another user and the script works.

 But now i have the problem using the login button ( go button)

 i try as  src:

 # the Watir controller
 require watir

 # set a variable
 test_site = https://www.go3-stage.engelvoelkers.com/dGPS3.pre/default.jsp;

 # open the IE browser
 ie = Watir::IE.new

 # print some comments
 puts Beginning of test: Google search.

 puts  Step 1: go to the test site:  + test_site

 ie.goto test_site

 puts  Step 2.1: enter 'login=testauto' in the  text field.

 ie.frame(:name, frmEngineLogin).text_field(:id, inputUid).set testauto

 puts  Step 2.2: enter Password=123456.

 ie.frame(:name, frmEngineLogin).text_field(:id, inputPwd).set 123456

 puts  Step 3: Press Login Button 

 ie.frame(:name, frmEngineLogin).button(:src, /go/).click

 -
 i try as with the title

 ie.frame(:name, frmEngineLogin).button(:title, Login).click

 -
 Also not working-... any idea what i missing?

 Via the ie developers toolbar is see that it is the same frame as username
 and password. So what is missing?
--~--~-~--~~~---~--~~
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] eclipse plugin update site for WATIR

2009-04-27 Thread JP

Hi,

Could anyone post a new watir plugin update site for eclipse 3.4
ganymade. Thanks for advance,

--~--~-~--~~~---~--~~
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: eclipse plugin update site for WATIR

2009-04-27 Thread Charley Baker
If it's not already included, try this:
http://download.eclipse.org/technology/dltk/downloads/
Stable release.


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


On Mon, Apr 27, 2009 at 8:26 AM, JP bytebrain@gmail.com wrote:


 Hi,

 Could anyone post a new watir plugin update site for eclipse 3.4
 ganymade. Thanks for advance,

 


--~--~-~--~~~---~--~~
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: Excel Data Driven Harness with Database Verifications

2009-04-27 Thread Tiffany Fodor

Hi Lokesh!

You can use any stylesheet you like to transform the xml to html, it
just has to be referenced in the xml you're transforming.  I haven't
done a lot of work with xsl, just enough to write the stylesheet
included with the framework.  I learned what I know here:

http://www.w3schools.com/xsl/

Maybe you can find some tips on improving the report there.

Hope this helps!

-Tiffany

On Apr 27, 5:47 am, lokesh.agra...@gmail.com
lokesh.agra...@gmail.com wrote:
 Hi All,

 I am using Excel Data Driven Harness with Database Verifications as
 framework in my 
 project.http://wiki.openqa.org/display/WTR/Excel+Data+Driven+Harness+with+Dat...

 There is one xsl sheet (transform-results.xsl)to convert xml report to
 HTML report. I don't like that report.

 is there any other way to generate report in HTML file with this
 framework or there is any other stylesheet (more pretty) which I can
 use?

 Thanks in advance for your help.

 Thanks and Regards,
 Lokesh Agrawal
--~--~-~--~~~---~--~~
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: Select from auto-complete

2009-04-27 Thread Paul Rogers
you wont be ble to do this with watir at the moment. THe reason is that
right now watir doesnt support all the event info on a key press ( most of
the time watir works fine)

There is some stuff on the wiki that begins to address this -
http://wiki.openqa.org/display/WTR/Possibilities+For+New+Events+in+Watir

I have some more code that may help, but I dont know what state its in.
Email me directly if you want it

Paul

On Mon, Apr 27, 2009 at 12:17 AM, Hemalatha Sivasubramaniam 
hema.wa...@gmail.com wrote:

 I have a select field, that acts both as auto-complete and select box, i'm
 not able to set value in that field using watir script. The HTML code for
 that select field is below,

 input class=dojoComboBox type=text dojoattachpoint=textInputNode 
 dojoattachevent=key:_handleKeyEvents;
 keyUp: onKeyUp; compositionEnd; onResize; autocomplete=off style=/
 img class=dojoComboBox hspace=0 vspace=0 
 src=/eglcms/struts/dojo/src/widget/templates/images/combo_box_arrow.png 
 dojoattachevent=onMouseUp:
 handleArrowClick; onResize; dojoattachpoint=downArrowNode style=width:
 14px; height: 14px;/
 and when i type in something (say letter T), i should be able to select
 from the list that appears like this

 span class=dojoComboBoxOptions style=position: absolute; width: 140px;
 height: 32px; z-index: 1001; left: 325px; top: 702px; opacity: 0; display:
 none;  div class=dojoComboBoxItem dojoComboBoxItemEven resultname=T
 MATHI resultvalue=3
  b class=T MATHI/b
 /div
  div class=dojoComboBoxItem dojoComboBoxItemOdd resultname=T BABU
 resultvalue=22T BABU/div
  /span

 If i have to select the first or the second option, How should i be doing
 it in watir?

 I have tried firing the events, but the list doesn't appear. I have the
 watir script code below:

 browser2.text_field(:class,dojoComboBox).focus()
 browser2.text_field(:class,dojoComboBox).set T
 browser2.text_field(:class,dojoComboBox).fire_event('onblur')
 Watir::Waiter.wait_until
 {browser2.span(:class,dojoComboBoxOptions).div(:text,/t mathi/).exists?}
 browser2.div(:class,formmainbox).span(:class,dojoComboBoxOptions).div(:text,/t
 mathi/).click

 I get an error at the wait until where the operation times out.
 I have tried the script using Watir 1.6.2, Ruby 1.8.26 using both Firefox
 3.0 and IE 7.0

 Any solution would be helpful.

 Regards,
 Hema


 


--~--~-~--~~~---~--~~
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: Apply a patch to FireWatir and JSSH

2009-04-27 Thread Chris McMahon


 Does anyone know what that means/can post a step by step guide for
 it?  Or is there a better way to run multiple instances?

Use Selenium-RC?  :-)

Seriously though, this would be a great feature to have.  The problem
is that Firefox depends on a profile.  Selenium is smart enough to
start each FF instance pointed at its own profile, but jssh never
built that in.

But since jssh is abandonware, it'll be tough to get that feature
working well.  Sai Venkat just this week checked in a spike to use
WebDriver's Firedriver (I think) rather than jssh, but it'll be some
time I think before any of this is well-supported in Watir.

-Chris


--~--~-~--~~~---~--~~
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] thinking about automation frameworks/harnesses

2009-04-27 Thread Chris



Bret has mentioned on any number of occasions that one of the hardest
things for a new user of Watir to grasp is how to go about building a
test framework or a test harness.

I wrote a simple, but useful, test harness in about 50 lines of code,
that demonstrates a few important principles of a test harness here:
http://chrismcmahonsblog.blogspot.com/2009/04/ui-test-framework-design-using-watir.html

This code is a very simple emulation of the harness I've been using
for the past two years, which is currently supporting more than 10,000
individual assertions about the behavior of an application, so I know
this scheme is effective and scalable.

Please note:  I wrote this demo as part of my campaign to get a new
job.  If you use it for the same purpose, it would behoove you to say
where you got it.  It might also be helpful to make it a little
fancier.   Also, if you use it as a basis for your own test harness,
I'd appreciate it if you let me know.

-Chris
--~--~-~--~~~---~--~~
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 call a function fom Excel ?

2009-04-27 Thread sHiVa

Thanks  alot Wilson. Code is working. I would be very greateful to
you.

Regards
Siva

On Apr 27, 1:26 pm, Wilson Xu xu.xiaodong.wil...@gmail.com wrote:
 The following method maybe help you.
 *eval * eval( *aString* *[*, *aBinding* *[* *file* *[* *line* *]* *]* *]*)
 - *anObject*
  Evaluates the Ruby expression(s) in *aString*. If *aBinding* is given, the
 evaluation is performed in its context. The binding may be a Binding object
 or a Proc object. If the optional *file* and *line* parameters are present,
 they will be used when reporting syntax errors.

 Wilson



 On Sat, Apr 25, 2009 at 11:47 PM, sHiVa krapa.ph...@gmail.com wrote:

  Hi all,

  I would like to manage my test suite in excel sheet. I put all of my
  function calls in  excel.
  when i call a functions from excel sheet that is a string type.  How
  can i execute that funtion at runtime?

  Regards
  Siva Paneendra krapa- Hide quoted text -

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



[wtr-general] Re: show form select_list objects text

2009-04-27 Thread George

Oops, my bad...sorry about that! Glad it worked out for you though...

On Apr 27, 1:20 am, jason jason.franklin.sto...@gmail.com wrote:
 Ah

 getAllContents

 Thanks!!
 works.

 On 27 Apr., 10:11, jason jason.franklin.sto...@gmail.com wrote:

  Thanks for the suggestion.
  unfortunately it dont work :-(

   contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects

  returns a empty string.

  On 26 Apr., 00:21, George george.sand...@gmail.com wrote:

   Hi there,

   If you're looking to get all the options in a select list and put it
   into an array, you can use this:

   contents = ff.form(:index, 1).select_list[1].getAllObjects

   -George

   On Apr 25, 1:25 pm, jason jason.franklin.sto...@gmail.com wrote:

I have looked around and found no love on this subject.

I would like to discover the text of a forms select list - is this
at all possible?

i.e

ff.form(:index, 1).select_list[1].each do |option|
 puts option.inspect
end

Results in this output - but does not include the text in the option:
option value=100Hello/option

name:
type:
id:
value:        100
disabled:     false

It would have though that the following would work:

ff.form(:index, 1).select_list[1].each do |option|
 puts option.text #or
 puts option.inner_text
end

but - no love.

any ideas would be very highly appreciated.

Thanks a million.
--~--~-~--~~~---~--~~
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: Rescue

2009-04-27 Thread «°¤§ømåtïçCðrp§ë¤°»

Alex,

It's not that I don't want the code to run, at all, but only if it
successfully binds/attaches to the browser.
My issue is that it's rescueing the error, but not halting after the
rescue; it continues to the next line of code.

If I know it's going to fail, and I want the code to terminate, after
the rescue, how can I implement it?
If I put a 'break' in there, the ruby syntax throws an error/warning
about it.

As is evident, by the attached Command Line output, the code continues
to run - after the rescue is invoked. How can I stop that!?


Thanks!
John

On Apr 26, 3:20 am, Alex Collins a.j.collins...@gmail.com wrote:
 John,

 Asking the obvious, if you don't want the code to run, why not remove  
 it or comment it out? I'm not entirely sure what you are after, so a  
 general response which I hope may still be useful.

 Firstly, the protected code block has the structure:

         begin
           expr..
         [rescue [error_type,..]
           expr..]..
         [else
           expr..]
         [ensure
           expr..]
         end

 In this, the end statement ends the block. It does not stop the  
 program running. In this case, the end statement after your puts  
 'please login..' line closes the begin block.

 To stop the program / script running, call the 'exit' method.

 Alternatively, if you want to build in behaviour around the lack of a  
 browser, you could always use an if-block:

 if browser
   # do stuff when you have a browser
 else
   # do stuff when you have no browser (browser = nil)
 end

 Alex

 On 26 Apr 2009, at 07:01, «°¤§ømåtïçCðrp§ë¤°» wrote:





  I'm running a script, which has a rescue clause, but I want it to
  (essentially) break, when the rescue clause is invoked.

  Instead, it runs to the next line:

  C:\Documents and Settings\Marissa\Desktopruby T3.rb
  What is the user's First Name?
  Test
  What is the user's Last Name?
  Test
  ALERT: You must have a running instance of SVC open!
  Please log into SVC and restart Sevin. Exiting: Code1.
  T3.rb:18: undefined method `frame' for nil:NilClass (NoMethodError)

  To state the obvious: The frame it's looking for is not going to be
  there, so I don't even want it to go there.

  [Code]

  require 'watir'

  puts What is the user's First Name?
  Fname = gets.chomp #Removes return (recognized as new line command)
  character '\n'
  puts What is the user's Last Name?
  Lname = gets.chomp #Removes return (recognized as new line command)
  character '\n'

  begin
  �...@browser = Watir::IE.attach(:url, 'https://
 www.servicecenterweb.unisys.com/sc2/index.do')
     rescue Watir::Exception::NoMatchingWindowFoundException
       puts ALERT: You must have a running instance of SVC open!
      �...@browser1 = Watir::IE.new
      �...@browser1.goto('https://www.servicecenterweb.unisys.com/sc2/
  index.do')
       puts Please log into SVC and restart Sevin. Exiting: Code1.
     end
  �...@browser.frame(:id, 'detail').button(:id, 'X8').click
   #Insert company name and user
  �...@browser.frame(:id, 'detail').text_field(:id, 'X7').set(BAXTER)
  �...@browser.frame(:id, 'detail').text_field(:id, 'X78').set(Fname)
  �...@browser.frame(:id, 'detail').text_field(:id, 'X80').set(Lname)
  [/Code]

  If I put a 'break' in the rescue clause, it doesn't seem to like it,
  and 'end' really doesn't end, as you can see.

  So, is there a way I can ditch the script, if the rescue is invoked,
  or will I just have to deal with it going on to the next line?

  Thanks!- Hide quoted text -

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



[wtr-general] Re: Rescue

2009-04-27 Thread AR

Just to make sure I understand, let's lay out a basic rescue.

-- code --

begin
  assertion
  actions if assertion passes
rescue
  actions if assertion failed
end #rescue block

-- unrelated actions/functions here --



It sounds like you want the rescue to force the program to end safely
rather than crash with an error.  In that case:

begin
  assertion
  puts passed
rescue
  puts failed
  exit  #(I don't have my code in front of me but I believe it is
'exit' or 'quit', which will terminate the ruby program)
end #rescue block

I've used this type of block to ensure that a data file was present
before the test ran.  If it was not present, it would tell the user
and exit the script immediately.


Am I warm?

Thanks,
Adam

On Apr 27, 1:47 pm, «°¤§ømåtïçCðrp§ë¤°» john.bai...@unisys.com
wrote:
 Alex,

 It's not that I don't want the code to run, at all, but only if it
 successfully binds/attaches to the browser.
 My issue is that it's rescueing the error, but not halting after the
 rescue; it continues to the next line of code.

 If I know it's going to fail, and I want the code to terminate, after
 the rescue, how can I implement it?
 If I put a 'break' in there, the ruby syntax throws an error/warning
 about it.

 As is evident, by the attached Command Line output, the code continues
 to run - after the rescue is invoked. How can I stop that!?

 Thanks!
 John

 On Apr 26, 3:20 am, Alex Collins a.j.collins...@gmail.com wrote:

  John,

  Asking the obvious, if you don't want the code to run, why not remove  
  it or comment it out? I'm not entirely sure what you are after, so a  
  general response which I hope may still be useful.

  Firstly, the protected code block has the structure:

          begin
            expr..
          [rescue [error_type,..]
            expr..]..
          [else
            expr..]
          [ensure
            expr..]
          end

  In this, the end statement ends the block. It does not stop the  
  program running. In this case, the end statement after your puts  
  'please login..' line closes the begin block.

  To stop the program / script running, call the 'exit' method.

  Alternatively, if you want to build in behaviour around the lack of a  
  browser, you could always use an if-block:

  if browser
    # do stuff when you have a browser
  else
    # do stuff when you have no browser (browser = nil)
  end

  Alex

  On 26 Apr 2009, at 07:01, «°¤§ømåtïçCðrp§ë¤°» wrote:

   I'm running a script, which has a rescue clause, but I want it to
   (essentially) break, when the rescue clause is invoked.

   Instead, it runs to the next line:

   C:\Documents and Settings\Marissa\Desktopruby T3.rb
   What is the user's First Name?
   Test
   What is the user's Last Name?
   Test
   ALERT: You must have a running instance of SVC open!
   Please log into SVC and restart Sevin. Exiting: Code1.
   T3.rb:18: undefined method `frame' for nil:NilClass (NoMethodError)

   To state the obvious: The frame it's looking for is not going to be
   there, so I don't even want it to go there.

   [Code]

   require 'watir'

   puts What is the user's First Name?
   Fname = gets.chomp #Removes return (recognized as new line command)
   character '\n'
   puts What is the user's Last Name?
   Lname = gets.chomp #Removes return (recognized as new line command)
   character '\n'

   begin
   �...@browser = Watir::IE.attach(:url, 'https://
  www.servicecenterweb.unisys.com/sc2/index.do')
      rescue Watir::Exception::NoMatchingWindowFoundException
        puts ALERT: You must have a running instance of SVC open!
       �...@browser1 = Watir::IE.new
       �...@browser1.goto('https://www.servicecenterweb.unisys.com/sc2/
   index.do')
        puts Please log into SVC and restart Sevin. Exiting: Code1.
      end
   �...@browser.frame(:id, 'detail').button(:id, 'X8').click
    #Insert company name and user
   �...@browser.frame(:id, 'detail').text_field(:id, 'X7').set(BAXTER)
   �...@browser.frame(:id, 'detail').text_field(:id, 'X78').set(Fname)
   �...@browser.frame(:id, 'detail').text_field(:id, 'X80').set(Lname)
   [/Code]

   If I put a 'break' in the rescue clause, it doesn't seem to like it,
   and 'end' really doesn't end, as you can see.

   So, is there a way I can ditch the script, if the rescue is invoked,
   or will I just have to deal with it going on to the next line?

   Thanks!- Hide quoted text -

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



[wtr-general] Re: Rescue

2009-04-27 Thread «°¤§ømåtïçCðrp§ë¤°»

You hit the nail on the head, thanks, Adam!

I tried using 'break', but the ruby syntax didn't like seeing the
'break' before 'end'.

Thanks!

On Apr 27, 2:39 pm, AR reed.a...@gmail.com wrote:
 Just to make sure I understand, let's lay out a basic rescue.

 -- code --

 begin
   assertion
   actions if assertion passes
 rescue
   actions if assertion failed
 end #rescue block

 -- unrelated actions/functions here --

 It sounds like you want the rescue to force the program to end safely
 rather than crash with an error.  In that case:

 begin
   assertion
   puts passed
 rescue
   puts failed
   exit  #(I don't have my code in front of me but I believe it is
 'exit' or 'quit', which will terminate the ruby program)
 end #rescue block

 I've used this type of block to ensure that a data file was present
 before the test ran.  If it was not present, it would tell the user
 and exit the script immediately.

 Am I warm?

 Thanks,
 Adam

 On Apr 27, 1:47 pm, «°¤§ømåtïçCðrp§ë¤°» john.bai...@unisys.com
 wrote:



  Alex,

  It's not that I don't want the code to run, at all, but only if it
  successfully binds/attaches to the browser.
  My issue is that it's rescueing the error, but not halting after the
  rescue; it continues to the next line of code.

  If I know it's going to fail, and I want the code to terminate, after
  the rescue, how can I implement it?
  If I put a 'break' in there, the ruby syntax throws an error/warning
  about it.

  As is evident, by the attached Command Line output, the code continues
  to run - after the rescue is invoked. How can I stop that!?

  Thanks!
  John

  On Apr 26, 3:20 am, Alex Collins a.j.collins...@gmail.com wrote:

   John,

   Asking the obvious, if you don't want the code to run, why not remove  
   it or comment it out? I'm not entirely sure what you are after, so a  
   general response which I hope may still be useful.

   Firstly, the protected code block has the structure:

           begin
             expr..
           [rescue [error_type,..]
             expr..]..
           [else
             expr..]
           [ensure
             expr..]
           end

   In this, the end statement ends the block. It does not stop the  
   program running. In this case, the end statement after your puts  
   'please login..' line closes the begin block.

   To stop the program / script running, call the 'exit' method.

   Alternatively, if you want to build in behaviour around the lack of a  
   browser, you could always use an if-block:

   if browser
     # do stuff when you have a browser
   else
     # do stuff when you have no browser (browser = nil)
   end

   Alex

   On 26 Apr 2009, at 07:01, «°¤§ømåtïçCðrp§ë¤°» wrote:

I'm running a script, which has a rescue clause, but I want it to
(essentially) break, when the rescue clause is invoked.

Instead, it runs to the next line:

C:\Documents and Settings\Marissa\Desktopruby T3.rb
What is the user's First Name?
Test
What is the user's Last Name?
Test
ALERT: You must have a running instance of SVC open!
Please log into SVC and restart Sevin. Exiting: Code1.
T3.rb:18: undefined method `frame' for nil:NilClass (NoMethodError)

To state the obvious: The frame it's looking for is not going to be
there, so I don't even want it to go there.

[Code]

require 'watir'

puts What is the user's First Name?
Fname = gets.chomp #Removes return (recognized as new line command)
character '\n'
puts What is the user's Last Name?
Lname = gets.chomp #Removes return (recognized as new line command)
character '\n'

begin
�...@browser = Watir::IE.attach(:url, 'https://
   www.servicecenterweb.unisys.com/sc2/index.do')
   rescue Watir::Exception::NoMatchingWindowFoundException
     puts ALERT: You must have a running instance of SVC open!
    �...@browser1 = Watir::IE.new
    �...@browser1.goto('https://www.servicecenterweb.unisys.com/sc2/
index.do')
     puts Please log into SVC and restart Sevin. Exiting: Code1.
   end
�...@browser.frame(:id, 'detail').button(:id, 'X8').click
 #Insert company name and user
�...@browser.frame(:id, 'detail').text_field(:id, 'X7').set(BAXTER)
�...@browser.frame(:id, 'detail').text_field(:id, 'X78').set(Fname)
�...@browser.frame(:id, 'detail').text_field(:id, 'X80').set(Lname)
[/Code]

If I put a 'break' in the rescue clause, it doesn't seem to like it,
and 'end' really doesn't end, as you can see.

So, is there a way I can ditch the script, if the rescue is invoked,
or will I just have to deal with it going on to the next line?

Thanks!- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before 

[wtr-general] select_list().options valid?

2009-04-27 Thread Karl

Runnin SafariWatir, OS X 10.5.6, Safari 4.0 (beta), and the latest
safariwatir (et al) gems.

This method:
  Watir::Browser.default = 'safari'
  b = Watir::Browser.new
  b.goto http://my_site.com;
  b.select_list(:id, state).options

returns:
  NoMethodError: undefined method `options' for
#Watir::Container::SelectList:0x11e4dd4

Yes, there is a select list with an id=state.

Am I missing something?

--~--~-~--~~~---~--~~
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: thinking about automation frameworks/harnesses

2009-04-27 Thread Wesley Chen
That maybe a frame, but I think it is not housed well enough.

Thanks.
Wesley Chen.


On Tue, Apr 28, 2009 at 12:33 AM, Chris christopher.mcma...@gmail.comwrote:

 ate it if you let me know.


--~--~-~--~~~---~--~~
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: Finding Someone Special With an Online Dating Service

2009-04-27 Thread George

Ooo, a spammer!  Does this mean we're a legitimate mailing list now?

On Apr 27, 11:01 am, simson sonatch sonatch.sim...@gmail.com wrote:
 3 Tips For Safer Online Datinghttp://secret-dating.we.bs/dating-tips016.html

 Guide For Online Datinghttp://secret-dating.we.bs/dating-tips017.html

 Finding Someone Special With an Online Dating 
 Servicehttp://secret-dating.we.bs/dating-tips018.html

 Dating Safety Tipshttp://secret-dating.we.bs/dating-tips019.html

 Online Singles Dating - Modern Dating How It Can Work For 
 Youhttp://secret-dating.we.bs/dating-tips020.html

 Dating Tips to Keep Your Relationships 
 Healthyhttp://secret-dating.we.bs/dating-tips021.html

 What Does Your Online Dating Photo Say About 
 You?http://secret-dating.we.bs/dating-tips022.html
--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread Anna Gabutero

Hi Yogesh,

Try reading: http://wiki.openqa.org/display/WTR/Support


On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
 I need to check all the ads/images present on the webpage.They all are
 coming from different locations,need to verify ,all images are loading
 fine,no 404/302 error, also need to check the magic no is coming
 correctly for that image.
 
 
 you can use http://fanhouse.com as a input url.
 
 
 
 Thanks,
 
 Yogesh
 
  
 
 
 Use the link below to report this message as spam.
 https://lavabit.com/apps/teacher?sig=561613key=3600820026
 


--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh

yeah..i read that...sorry for the little information..

I need to check all the advertisement/images present on the page.Do we
have anything ,any method in watir/ruby by which i can verify this.
For image loading,we have image.hasloaded?..

On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
 Hi Yogesh,

 Try reading:http://wiki.openqa.org/display/WTR/Support

 On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:

  I need to check all the ads/images present on the webpage.They all are
  coming from different locations,need to verify ,all images are loading
  fine,no 404/302 error, also need to check the magic no is coming
  correctly for that image.

  you can usehttp://fanhouse.comas a input url.

  Thanks,

  Yogesh

  
  Use the link below to report this message as spam.
 https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread Paul Rogers
are the ads:
  images
  flash
  in a div
  in an iframe

?

kind of difficult to help you with this one.

Paul


On Mon, Apr 27, 2009 at 8:35 PM, yogesh er.yogeshkhandel...@gmail.comwrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all are
   coming from different locations,need to verify ,all images are loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 
 


--~--~-~--~~~---~--~~
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: select_list().options valid?

2009-04-27 Thread George


instead of options, try getAllContents


On Apr 27, 3:17 pm, Karl threadh...@gmail.com wrote:
 Runnin SafariWatir, OS X 10.5.6, Safari 4.0 (beta), and the latest
 safariwatir (et al) gems.

 This method:
   Watir::Browser.default = 'safari'
   b = Watir::Browser.new
   b.goto http://my_site.com;
   b.select_list(:id, state).options

 returns:
   NoMethodError: undefined method `options' for
 #Watir::Container::SelectList:0x11e4dd4

 Yes, there is a select list with an id=state.

 Am I missing something?
--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
yeah...ads are in iframe...flash is having embed id..don't know how to deal
with that..i installed flash-watir also but not able to get the expected
result

On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh er.yogeshkhandel...@gmail.comwrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all are
   coming from different locations,need to verify ,all images are loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 



 



-- 
Thanks,
Yogesh Khandelwal
AOL Online India Pvt. Ltd.
+919886993776

--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread Paul Rogers
so what are you trying to test? The ads show up? the ads function correctly?
The impression count gets incremented correctly?

If you only want to see if the ad shows up, just check the iframe has some
valid html
If you want to see if the ad functions correctly, maybe loading it into its
own page outside of the iframe is the best solution. Especially if they are
flash


Paul

On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal 
er.yogeshkhandel...@gmail.com wrote:

 yeah...ads are in iframe...flash is having embed id..don't know how to deal
 with that..i installed flash-watir also but not able to get the expected
 result


 On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh er.yogeshkhandel...@gmail.comwrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all
 are
   coming from different locations,need to verify ,all images are
 loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 







 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776


 


--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
yeah i tried with valid html but i think watir1.6.2 is not supporting
iframe.html method,i want to check the magic no of the ads and if we click
on the ad,it should take as to right page..

[If you want to see if the ad functions correctly, maybe loading it into
its own page outside of the iframe is the best solution. Especially if they
are flash]
i tried this also, but not able to get the src of the ads,it's in iframe
..here is the code ,what i've tried.

def test_ad
adFrame = ie.frame(:id,/adsonar_serve/)
#puts '-'
#puts adFrame.html
#puts '-'

if adFrame == nil
verify(adFrame!=nil, 'ad test failed, could not locate ad frame')

else
html = adFrame.html

pos1 = html.index(BODY)
pos2 = html.index(/BODY)

substring = html[pos1..pos2]

#puts substring.length

verify(substring.length  100, 'ad test failed, could not locate ad on
main page')
end#end else
  end
end

Yogesh

On Tue, Apr 28, 2009 at 9:08 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 so what are you trying to test? The ads show up? the ads function
 correctly? The impression count gets incremented correctly?

 If you only want to see if the ad shows up, just check the iframe has some
 valid html
 If you want to see if the ad functions correctly, maybe loading it into its
 own page outside of the iframe is the best solution. Especially if they are
 flash


 Paul

 On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah...ads are in iframe...flash is having embed id..don't know how to
 deal with that..i installed flash-watir also but not able to get the
 expected result


 On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh 
 er.yogeshkhandel...@gmail.comwrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all
 are
   coming from different locations,need to verify ,all images are
 loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 







 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776





 



-- 
Thanks,
Yogesh Khandelwal
AOL Online India Pvt. Ltd.
+919886993776

--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread Paul Rogers
if the iframes are in different domains you will struggle to access the
contents of the iframe. Its a secrity thing in the browser.
Can you get the main page with net/http and then parse that for the urls of
the iframes and then open these individually in watir?

Paul

On Mon, Apr 27, 2009 at 9:46 PM, yogesh khandelwal 
er.yogeshkhandel...@gmail.com wrote:

 yeah i tried with valid html but i think watir1.6.2 is not supporting
 iframe.html method,i want to check the magic no of the ads and if we click
 on the ad,it should take as to right page..

 [If you want to see if the ad functions correctly, maybe loading it into
 its own page outside of the iframe is the best solution. Especially if they
 are flash]
 i tried this also, but not able to get the src of the ads,it's in iframe
 ..here is the code ,what i've tried.

 def test_ad
 adFrame = ie.frame(:id,/adsonar_serve/)
 #puts '-'
 #puts adFrame.html
 #puts '-'

 if adFrame == nil
 verify(adFrame!=nil, 'ad test failed, could not locate ad frame')

 else
 html = adFrame.html

 pos1 = html.index(BODY)
 pos2 = html.index(/BODY)

 substring = html[pos1..pos2]

 #puts substring.length

 verify(substring.length  100, 'ad test failed, could not locate ad on
 main page')
 end#end else
   end
 end

 Yogesh


 On Tue, Apr 28, 2009 at 9:08 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 so what are you trying to test? The ads show up? the ads function
 correctly? The impression count gets incremented correctly?

 If you only want to see if the ad shows up, just check the iframe has some
 valid html
 If you want to see if the ad functions correctly, maybe loading it into
 its own page outside of the iframe is the best solution. Especially if they
 are flash


 Paul

 On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah...ads are in iframe...flash is having embed id..don't know how to
 deal with that..i installed flash-watir also but not able to get the
 expected result


 On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.cawrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh 
 er.yogeshkhandel...@gmail.comwrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all
 are
   coming from different locations,need to verify ,all images are
 loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 







 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776









 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776

 


--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
how do i get the url of the iframe? if you can tell me how we can get the
url than i can parse it using net/htpp.

Also for flash,.click() method doesnot work.

Thanks,
Yogesh

On Tue, Apr 28, 2009 at 9:29 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 if the iframes are in different domains you will struggle to access the
 contents of the iframe. Its a secrity thing in the browser.
 Can you get the main page with net/http and then parse that for the urls of
 the iframes and then open these individually in watir?

 Paul


 On Mon, Apr 27, 2009 at 9:46 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah i tried with valid html but i think watir1.6.2 is not supporting
 iframe.html method,i want to check the magic no of the ads and if we click
 on the ad,it should take as to right page..

 [If you want to see if the ad functions correctly, maybe loading it into
 its own page outside of the iframe is the best solution. Especially if they
 are flash]
 i tried this also, but not able to get the src of the ads,it's in iframe
 ..here is the code ,what i've tried.

 def test_ad
 adFrame = ie.frame(:id,/adsonar_serve/)
 #puts '-'
 #puts adFrame.html
 #puts '-'

 if adFrame == nil
 verify(adFrame!=nil, 'ad test failed, could not locate ad frame')

 else
 html = adFrame.html

 pos1 = html.index(BODY)
 pos2 = html.index(/BODY)

 substring = html[pos1..pos2]

 #puts substring.length

 verify(substring.length  100, 'ad test failed, could not locate ad on
 main page')
 end#end else
   end
 end

 Yogesh


 On Tue, Apr 28, 2009 at 9:08 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 so what are you trying to test? The ads show up? the ads function
 correctly? The impression count gets incremented correctly?

 If you only want to see if the ad shows up, just check the iframe has
 some valid html
 If you want to see if the ad functions correctly, maybe loading it into
 its own page outside of the iframe is the best solution. Especially if they
 are flash


 Paul

 On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah...ads are in iframe...flash is having embed id..don't know how to
 deal with that..i installed flash-watir also but not able to get the
 expected result


 On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.cawrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh er.yogeshkhandel...@gmail.com
  wrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They all
 are
   coming from different locations,need to verify ,all images are
 loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 







 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776









 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776




 



-- 
Thanks,
Yogesh Khandelwal
AOL Online India Pvt. Ltd.
+919886993776

--~--~-~--~~~---~--~~
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 do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
okie..i'll try.

Do we still have ie.frame.html method with watir1.6.2 or it's removed?

Thanks for your help

Thanks,
Yogesh

On Tue, Apr 28, 2009 at 9:44 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 you'll have to get the top level url using net/http and parse that. I dont
 think you'll do it easily with watir other wise

 Paul


 On Mon, Apr 27, 2009 at 10:11 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 how do i get the url of the iframe? if you can tell me how we can get the
 url than i can parse it using net/htpp.

 Also for flash,.click() method doesnot work.

 Thanks,
 Yogesh


 On Tue, Apr 28, 2009 at 9:29 AM, Paul Rogers paul.rog...@shaw.ca wrote:

 if the iframes are in different domains you will struggle to access the
 contents of the iframe. Its a secrity thing in the browser.
 Can you get the main page with net/http and then parse that for the urls
 of the iframes and then open these individually in watir?

 Paul


 On Mon, Apr 27, 2009 at 9:46 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah i tried with valid html but i think watir1.6.2 is not supporting
 iframe.html method,i want to check the magic no of the ads and if we click
 on the ad,it should take as to right page..

 [If you want to see if the ad functions correctly, maybe loading it
 into its own page outside of the iframe is the best solution. Especially if
 they are flash]
 i tried this also, but not able to get the src of the ads,it's in iframe
 ..here is the code ,what i've tried.

 def test_ad
 adFrame = ie.frame(:id,/adsonar_serve/)
 #puts '-'
 #puts adFrame.html
 #puts '-'

 if adFrame == nil
 verify(adFrame!=nil, 'ad test failed, could not locate ad frame')

 else
 html = adFrame.html

 pos1 = html.index(BODY)
 pos2 = html.index(/BODY)

 substring = html[pos1..pos2]

 #puts substring.length

 verify(substring.length  100, 'ad test failed, could not locate ad
 on main page')
 end#end else
   end
 end

 Yogesh


 On Tue, Apr 28, 2009 at 9:08 AM, Paul Rogers paul.rog...@shaw.cawrote:

 so what are you trying to test? The ads show up? the ads function
 correctly? The impression count gets incremented correctly?

 If you only want to see if the ad shows up, just check the iframe has
 some valid html
 If you want to see if the ad functions correctly, maybe loading it into
 its own page outside of the iframe is the best solution. Especially if 
 they
 are flash


 Paul

 On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal 
 er.yogeshkhandel...@gmail.com wrote:

 yeah...ads are in iframe...flash is having embed id..don't know how to
 deal with that..i installed flash-watir also but not able to get the
 expected result


 On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers paul.rog...@shaw.cawrote:

 are the ads:
   images
   flash
   in a div
   in an iframe

 ?

 kind of difficult to help you with this one.

 Paul



 On Mon, Apr 27, 2009 at 8:35 PM, yogesh 
 er.yogeshkhandel...@gmail.com wrote:


 yeah..i read that...sorry for the little information..

 I need to check all the advertisement/images present on the page.Do
 we
 have anything ,any method in watir/ruby by which i can verify this.
 For image loading,we have image.hasloaded?..

 On Apr 28, 7:19 am, Anna Gabutero a...@lavabit.com wrote:
  Hi Yogesh,
 
  Try reading:http://wiki.openqa.org/display/WTR/Support
 
  On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
 
   I need to check all the ads/images present on the webpage.They
 all are
   coming from different locations,need to verify ,all images are
 loading
   fine,no 404/302 error, also need to check the magic no is coming
   correctly for that image.
 
   you can usehttp://fanhouse.comas a input url.
 
   Thanks,
 
   Yogesh
 
  
 
   Use the link below to report this message as spam.
  https://lavabit.com/apps/teacher?sig=561613key=3600820026
  
 







 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776









 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776








 --
 Thanks,
 Yogesh Khandelwal
 AOL Online India Pvt. Ltd.
 +919886993776




 



-- 
Thanks,
Yogesh Khandelwal
AOL Online India Pvt. Ltd.
+919886993776

--~--~-~--~~~---~--~~
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: about the flash watir example code

2009-04-27 Thread yogesh

i don't have object tag in my flash,i've embed that like

embed height=84 align=L width=287 pluginspage=http://
www.macromedia.com/go/getflashplayer version=9,0,0,0
flashvars=refreshFrames=adFrameamp;configUrl=http%3A//
xml.channel.aol.com/xmlrepository/fetch.adp%3Fid%3D450664
wmode=opaque bgcolor=#030303 allowscriptaccess=always
src=http://www.aolcdn.com/sportsdata/miniscorecard/flash/miniad/
microminiscoreboard.swf?random=1240894014240 id=miniscoreboard.swf/


i tried by id but not able to click on the flash.

Thanks,
Yogesh

On Apr 16, 9:43 pm, Chuck van der Linden sqa...@gmail.com wrote:
 oh indeed..  I was jumping to an unwarranted conclusion based on some
 prior user's issues with this same sample code.

 looks like you are properly identifying the flash object..

 not sure why the click method would not be defined.  I've seen that in
 some instances where the browser object has gone away, but given what
 I see if your code that doesn't seem likely.

 I think you might need to seek assistance directly with the folks
 developing flashwatir..

 On Apr 15, 6:07 pm, Fish hhfish...@hotmail.com wrote:

  hi linden, thank you for your help, but it doesn't work, I think the
  id means

  object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
  codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
  swflash.cab#version=8,0,0,0 width=100 height=100 id=clickcolors
  align=middle

  you can find from the console output that the percentage_loaded  is
  100, so I think the watir have recognized the flash object.

  my current question is about this error:
  D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
  flash.rb:91:in
  `execute': Unable to execute the method on flash document
  ['clickcolors'].click()
  ; (NoMethodError)

  very appreciate your help
  On Apr 16, 4:11 am, Chuck van der Linden sqa...@gmail.com wrote:

   this doesn't require flash experience.  you just need to understand
   the basics of how watir identifies objects..  the code is telling it
   to look for an object with the id value of 'clickcolors' which was
   just an example ID in the code.  The error is telling you that there's
   nothing on the page with that ID

   to make that code work you are likely to have to modify it a bit,
   starting with figuring out how to identify the flash element you are
   trying to interact with, and changing the code accordingly.

   Use the IE developer toolbar to examine the page and figure out a good
   way to identify the embedded flash.

   Unless I'm misreading the page, you should find that for the page you
   gave, you'll need to use :name  and 'coloredSquare'

   Since flashwatir is built on watir, I STRONGLY recommend you go
   through the tutorials for Watir, that will teach you the basics of the
   tool, before you start trying to work with not only a html page, but
   one with flash on it.

   On Apr 15, 3:41 am, Fish hhfish...@hotmail.com wrote:

Hi, I just go through the google code of watir flash and try to use
the example code.
when I use the URL 
ofhttp://www.geocities.com/paulocaroli/flash/colors.html
the error says can not find the id with clickcolors
after that I use the 'file:///E:/ruby/flash/changingcolors/
changingcolors/colors.html'
the error says

D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:91:in
`execute': Unable to execute the method on flash document
['clickcolors'].click()
; (NoMethodError)

the example code:

# include the controller
require 'flash_watir'
include FireWatir
# create an instance of the controller
browser = Firefox.new
# go to the flash page you want to test
browser.goto('file:///E:/ruby/flash/changingcolors/changingcolors/
colors.html')
# call the default methods available in flash

percentage_loaded = browser.flash(:id, clickcolors).percent_loaded
puts percentage_loaded
# call the methods you have exposed on the flash application
browser.flash(:id, clickcolors).click
rectangle_color = browser.flash(:id, clickcolors).getColor
puts rectangle_color

==
the console output:

E:\ruby\script1.rb
100
D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:91:in
`execute': Unable to execute the method on flash document
['clickcolors'].click()
; (NoMethodError)
        from D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/
flash_watir/fl
ash.rb:82:in `process_request'
        from D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/
flash_watir/fl
ash.rb:77:in `method_missing'
        from E:/ruby/script/1.rb:13

Is there anyone who have experience in flash?
Thanks a lot in advance- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are 

[wtr-general] Re: select_list().options valid?

2009-04-27 Thread Karl

Sorry, that doesn't work either. Same error message.

On Apr 27, 8:02 pm, George george.sand...@gmail.com wrote:
 instead of options, try getAllContents

--~--~-~--~~~---~--~~
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: jssh error - Watir::Exception::UnableToStartJSShException

2009-04-27 Thread emz452

Just an update -
I didn't end up working from home today, so didn't get a chance to
test those things out. However, I had to re-install / setup everything
on a different computer (again) at the new office and it's all working
perfectly!

Once I try out faejon's suggestions, if they don't work, I think I'll
setup my environment from scratch again and see if that fixes it!

thanks all :)

On Apr 24, 5:46 pm, emz452 emz...@gmail.com wrote:
 Thanks for the suggestions faejon, I'll try these things and let you
 know how I go (long weekend where I am, so Tuesday will be the next
 working day for me!)

 Angrez - Yep, I have sudo/admin rights and can start firefox with
 sudo.

 On Apr 24, 4:08 pm, Angrez Singh ang...@gmail.com wrote:

  I think jssh is not installed properly, do you have admin rights? or can you
  start Firefox -jssh with sudo command?

  - Angrez

  On Fri, Apr 24, 2009 at 8:04 AM, faejon fae...@gmail.com wrote:

   On Apr 22, 7:17 pm, emz452 emz...@gmail.com wrote:
Hi there,

   ~~~ SNIP ~~~
If I launch firefox with -jssh and try to telnet:
em...@emily-desktop:~$ firefox -jssh
em...@emily-desktop:~$ telnet localhost 9997
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
em...@emily-desktop:~$
   ~~~ SNIP ~~~
Many thanks,
Emily

   Emily the above telnet test indicates that you are unable to
   communicate with your local machine on port 9997. I would check your
   firewall / ipchains settings and make sure that you are not blocking
   connections from 127.0.0.1 - 127.0.0.1. I would think that it would
   be allowed but you never know.

   You could also try disabling the firewall on your machine and then
   telnet to port 9997 while firefox is running to make certain if it is
   the firewall or not.
--~--~-~--~~~---~--~~
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 use the Watir::SelectList methods?

2009-04-27 Thread Wesley Chen
Hey, guys,
How to use the select list methods on page:
http://wtr.rubyforge.org/rdoc/classes/Watir/SelectList.html

Any limitations to use the great methods?

Thanks.
Wesley Chen.

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