[wtr-general] Re: Safari Getting Table Cell Text

2011-12-08 Thread Brad
Sorry I put down the wrong error message. I'm actually getting

/Library/Ruby/Gems/1.8/gems/safariwatir-0.4.0/lib/safariwatir/
scripter.rb:189:in `find_cell': uninitialized constant
Watir::JavaScripter::MissingWayOfFindingObjectException (NameError)

My code:

require 'rubygems'
require 'safariwatir'
@b = Watir::Safari.new
@b.goto(my_webpage)
cell = @b.table(:class, user-table)[0][1] #getting row 0 cell 1
puts cell.text

I followed all the instructions on this page
https://github.com/zeljkofilipin/watirbook/blob/master/installation/mac.md

All of my gems are up to date.

Thanks for your help


On Dec 8, 4:49 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, Dec 7, 2011 at 5:32 PM, Brad bradask...@gmail.com wrote:
  It seems like this should be working
  cell = @b.table(:class, user-table)[0][1] #getting row 0 cell 1
  puts cell.text

 O have replied at SO:

 http://stackoverflow.com/questions/8419360/getting-cell-text-from-a-t...

 Željko
 --
 watir.com/book - author

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

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


[wtr-general] Re: Goto Not working with FireFox on Mac....

2011-02-14 Thread Brad
Thanks Bill!

Don't I feel stupid? I only went as far as to verify the array
contained strings with urls[0] but I never even tried #.chomp :-(

That worked!

I'm glad I asked.

Thanks again.

Brad

On Feb 14, 12:33 pm, Bill Agee billa...@gmail.com wrote:
 I would inspect the strings in your urls array, to make sure they're in
 the state that you expect.  Could be a trailing line separator is still
 included in each string.

 IO#readlines preserves newlines, so that would be the first thing I would
 check.

 You can just type urls[0] in IRB and see if the first string has a
 newline, or inspect the entire array with

   require 'pp'
   pp urls

 A quick fix might be to use chomp in your navigation loop:

   ff.goto(url.chomp)

 Thanks
 Bill







 On Mon, Feb 14, 2011 at 8:16 AM, Brad bradask...@gmail.com wrote:
  I have a very simple example that shows FF on the Mac doesn't work the
  same as FF on the PC.

  I basically just want to read in a list of URLs from a text file and
  goto those sites and do some processing...

  require 'rubygems' # for mac not included in PC version but here for
  clarification
  require 'firewatir'

  ff = FireWatir::Firefox.new
  f = File.open(pathToTexFileWithURLS)
  urls = f.readlines

  urls.each do |url|
         ff.goto(url)
  end

  MAC ERROR
  /Library/Ruby/Gems/1.8/gems/firewatir-1.7.1/lib/firewatir/
  jssh_socket.rb:19:in `js_eval':  unterminated string literal
  (JsshSocket::JSSyntaxError)
         from /Library/Ruby/Gems/1.8/gems/firewatir-1.7.1/lib/firewatir/
  firefox.rb:114:in `goto'
         from urls.rb:13
         from urls.rb:12:in `each'
         from urls.rb:12

  This works on the PC and Fails on the MAC.

  Does anyone know why?

  Thanks.

  Brad

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

  watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
  watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

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

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


[wtr-general] Watir on Linux

2010-08-11 Thread Brad
Hello All,

I've read and followed all the instructions on how to get Watir to run
on Linux with FireFox.

I'm using:
Ruby version 1.8.7
The Linux plugin jssh-3.6.x-Linux.xpi
FireFox 3.6.8
Watir 1.6.5

When I do:
require 'rubygems'
require 'watir'

Watir::Browser.default = 'firefox'
b = Watir::Browser.new
This brings up the FF Browser, yippie!
But I get the dreaded: 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

In the instructions it says to do: ./firefox-bin -jssh
I'm kind of new to Linux but when I run that command I get an error ./
firefox-bin: No such file or directory

Hence Telnet isn't working either.

Any help would be appreciated.

Thanks.

Brad

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

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


[wtr-general] Re: Tabs

2010-05-13 Thread Brad
Hey Wesley,

Thanks for the response.  I did however fail to mention I'm working on
Chrome and I don't believe Chrome supports 'attach'.

Brad

On May 12, 11:04 pm, Wesley Chen cjq@gmail.com wrote:
 ie = Watir::IE.attach(:title, xxx) can locate an existing IE window.
 ie.close can close the ie window

 Wesley.
 For life, the easier, the better.



 On Thu, May 13, 2010 at 4:26 AM, Brad bradask...@gmail.com wrote:
  Hello,

  I want to click on all the links on a page, got it, I have this
  working no problem. Some links have their target set to _blank which
  in turns involves a new tab (a browser tab) inside the same browser
  window. So if I only had one tab visible and active when the link is
  clicked now I have two tabs.

  So I have two questions:
  How do I go back to the original tab?
  How can I close the newly opened tab?

  Please let me know if you need more information.

  Thanks.

  Brad

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com

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

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

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

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


[wtr-general] Tabs

2010-05-12 Thread Brad
Hello,

I want to click on all the links on a page, got it, I have this
working no problem. Some links have their target set to _blank which
in turns involves a new tab (a browser tab) inside the same browser
window. So if I only had one tab visible and active when the link is
clicked now I have two tabs.

So I have two questions:
How do I go back to the original tab?
How can I close the newly opened tab?

Please let me know if you need more information.

Thanks.

Brad

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

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


[wtr-general] Re: After upgrading to Watir 1.6.2, it is not working fine.

2009-10-21 Thread Brad

I'm having a problem too.

Even if I'm in the IRB and type
require 'watir'

I get: no such file to load -- watir

I'm using the latest release candidate of Ruby 1.8.6-27 on a PC

On Oct 20, 6:11 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Oct 20, 2009 at 12:02 PM, meenu cutiemeenak...@gmail.com wrote:
  I am upgrading my watir version from 1.5 to 1.6.2
  odule/introspection.rb:70:in `const_get': no such file to load --
  safariwatir

 What platform are you on? SafariWatir works only on Mac.

 Please post the code that is causing the error.

 Ž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: After upgrading to Watir 1.6.2, it is not working fine.

2009-10-21 Thread Brad

Thanks using: require 'rubygems' work both in my script and in the
irb.

Why the change?

On Oct 21, 8:20 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, Oct 21, 2009 at 3:10 PM, Brad bradask...@gmail.com wrote:
  I get: no such file to load -- watir

 Try adding this at the top of the file:

 require rubygems

 Go to command prompt and type this:

 gem list watir

 What does it return?

  I'm using the latest release candidate of Ruby 1.8.6-27 on a PC

 I do not think that is the problem, buthttp://watir.com/installation/says:
 We recommend using Ruby 1.8.6-26 with Watir 1.6.

 Ž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] Can you determine if a link will pop up a dialog?

2009-09-29 Thread Brad

Hey,

Running through a web site and clicking on links I have put in things
like this:

code snippet
when  .zip
link.click_no_wait
is_popup(@dialog_text_1) # text on dialog box

when  .pdf
link.click_no_wait
is_popup(@dialog_text_1) # text on dialog box
/code snippet

So I can handle the pop up and clear them.

However, sometimes a PDF opens in the browser window instead of a pop
up.

Is there a way to determine if a link will have a pop up or not?

Thanks.

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

2009-09-28 Thread Brad

Surly I'm not the only person who has this problem :-)

On Sep 25, 7:49 am, Brad bradask...@gmail.com wrote:
 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: 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] Mac FireWatir PopUp

2009-09-24 Thread Brad

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

2009-09-23 Thread Brad

Anyone?

What am I missing?

On Sep 22, 4:26 pm, Brad bradask...@gmail.com wrote:
 Hello,

 Hope this isn't a dumb question but, I was trying to use
 datahandler.

 require 'watir'
 require 'watir/datahandler.rb'

 d = DataHandler.new('data.csv')
 one = d.data[1].Name
 puts one

 Now when I edit data.csv it's lock.  I can see in Task Manager
 excel.exe is running.

 How do you stop/close/kill excel.exe?

 Thanks.

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

2009-09-23 Thread Brad

Here's what I found out.

The method xls_data has in it @excel.quit and @excel = nil.  So I
copied those two lines and put them in the csv_data method.  Now when
I call that method excel is being closed.

It seems like any of the methods in the datahandler class should close
the file that is being opened.

Unless someone can tell me differently I'm sticking with it.

Brad

On Sep 23, 8:48 am, Brad bradask...@gmail.com wrote:
 Anyone?

 What am I missing?

 On Sep 22, 4:26 pm, Brad bradask...@gmail.com wrote:

  Hello,

  Hope this isn't a dumb question but, I was trying to use
  datahandler.

  require 'watir'
  require 'watir/datahandler.rb'

  d = DataHandler.new('data.csv')
  one = d.data[1].Name
  puts one

  Now when I edit data.csv it's lock.  I can see in Task Manager
  excel.exe is running.

  How do you stop/close/kill excel.exe?

  Thanks.

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

2009-09-22 Thread Brad

Hello,

Hope this isn't a dumb question but, I was trying to use
datahandler.

require 'watir'
require 'watir/datahandler.rb'

d = DataHandler.new('data.csv')
one = d.data[1].Name
puts one

Now when I edit data.csv it's lock.  I can see in Task Manager
excel.exe is running.

How do you stop/close/kill excel.exe?

Thanks.

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