[wtr-general] Watir 1.9.0 Release Candidate - Ruby 1.8.7 and IE9

2011-06-07 Thread Hugh McGowan
Hi all,

We've got a release candidate for Watir. If you're interested in
checking out the release before we go final, you can get it using:

gem install watir --pre

This release includes:
  * Support for IE9
  * Full support for Ruby 1.8.7
  * Remove Autoit (replaced with Rautomation)
  * Remove WinClicker (RIP)

Also note:

  * With this release we're no longer supporting Ruby 1.8.6. If you
cannot upgrade, you should stay on Watir 1.8.1
  * Modal dialogs are not yet supported in IE9. We hope to address
this in a follow-on release.
  * There is now only one supported way to work with javascript
dialogs - click_no_wait and ie.javascript_dialog. For example:

 
ie.button(:value=>'foo').click_no_wait
# use click_no_wait
 
ie.javascript_dialog.button('OK').click
# click the button, OR
 
ie.dialog.button('OK').click
# click the button (same thing, older name), OR
   ie.javascript_dialog(:title => 'Some window
title').button('OK').click# click a dialog without the default
windows title

   You can of course call out any button, just use the value of the
button...

Let us know if you find any issues and thanks for giving it an early
look!

Thanks!
Hugh

-- 
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: watir-webdriver

2011-06-07 Thread Chuck van der Linden
Is there a grid similar to the one for Watir that tells you what
methods can be used to identify what elements?

I've looked at the rdoc, and maybe I'm missing something that's
obvious to others, but when I look at an HTML_element such as say a
Span, how can I tell which attributes I am allowed to use to identify
the element?

With Watir, I can look at this Wiki page:
http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir
But it seems like Watir-Webdriver has a slightly different list of
allowed  elements and also 'hows'  that are supported when it comes
time to identify an element.

On Jun 6, 10:38 am, Jari Bakken  wrote:
> On Mon, Jun 6, 2011 at 6:57 PM, a b  wrote:
>
> > For instance:
> > That is a label :
> > 
> >      > class="macstring">Create User
>
> This isn't valid HTML, as the error message points out. Since the
> parent span is unique, I would in this case start from that and locate
> the first span inside it:
>
>   browser.span(:id => "macbodypage").span.text
>
> Calling #span without arguments assumes you want the first one. If you
> *really* need to locate elements using invalid attributes, you can
> always use an XPath:
>
>   browser.span(:xpath => "//span[@class='macstring' and
> @string='create_user']").text
>
> or iterate through them in Ruby, using Watir::Element#attribute_value
> to get to fetch the invalid attribute:
>
>   span = browser.spans(:class => "macstring").find { |e|
> e.attribute_value("string") == "create_user" }
>   span || raise("couldn't find span")
>
>   span.text
>
> The latest watir-webdriver docs can be found here:
>
>  http://rubydoc.info/gems/watir-webdriver/0.2.4/frames

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

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


Re: [wtr-general] not able to send commands to linux boxes when upgraded to Ruby 1.9.2

2011-06-07 Thread John Fitisoff
I may be wrong but I think support for the shell service stuff was dropped at 
some point, probably in 2.x.

You might want to switch to something like rye.



- Original Message 
From: Bhavesh 
To: Watir General 
Sent: Tue, June 7, 2011 3:55:51 PM
Subject: [wtr-general] not able to send commands to linux boxes when upgraded 
to 
Ruby 1.9.2

Hi

I have a setup where i have to send command to linux boxes.

I installed Ruby 1.9.2 and latest version of needle, net-sftp and net-
ssh.

routine is like --

def issueCommandInOKBox(okMachine="", command="", expectedLog="",
expectedResult="PASS", user="k1", passwd="1")
puts "issueCommandInOKBox: okMachine=#{okMachine}"
puts "issueCommandInOKBox: command=#{command}"
puts "issueCommandInOKBox: expectedLog=#{expectedLog}"
puts "issueCommandInOKBox: expectedResult=#{expectedResult}"
puts "issueCommandInOKBox: user=#{user}"
puts "issueCommandInOKBox: passwd=#{passwd}"

returnValue = true
Net::SSH.start( okMachine, user, passwd, :paranoid => false) do |
session|

shell = session.shell.sync
puts "Should print home directory:"
out = shell.pwd
p out.stdout

puts "Should print response logs after executing commmand:"

out = shell.send_command command
p out.stdout
$outputofissueCommandInOKBox = out.stdout
#puts "--- #{out.stdout}"
$_ = out.stdout



This is working fine when i have Ruby 1.8 and watir 1.6.5 with needle
1.1.0 and other netssh and netsftp.

But now when i upgraded, this fails.

I can do ssh using putty to these boxes, but through script it is
fialing.

Any help how i  can have this working?

Bhavesh

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

-- 
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] not able to send commands to linux boxes when upgraded to Ruby 1.9.2

2011-06-07 Thread Bhavesh
Hi

I have a setup where i have to send command to linux boxes.

I installed Ruby 1.9.2 and latest version of needle, net-sftp and net-
ssh.

routine is like --

def issueCommandInOKBox(okMachine="", command="", expectedLog="",
expectedResult="PASS", user="k1", passwd="1")
puts "issueCommandInOKBox: okMachine=#{okMachine}"
puts "issueCommandInOKBox: command=#{command}"
puts "issueCommandInOKBox: expectedLog=#{expectedLog}"
puts "issueCommandInOKBox: expectedResult=#{expectedResult}"
puts "issueCommandInOKBox: user=#{user}"
puts "issueCommandInOKBox: passwd=#{passwd}"

returnValue = true
Net::SSH.start( okMachine, user, passwd, :paranoid => false) do |
session|

shell = session.shell.sync
puts "Should print home directory:"
out = shell.pwd
p out.stdout

puts "Should print response logs after executing commmand:"

out = shell.send_command command
p out.stdout
$outputofissueCommandInOKBox = out.stdout
#puts "--- #{out.stdout}"
$_ = out.stdout



This is working fine when i have Ruby 1.8 and watir 1.6.5 with needle
1.1.0 and other netssh and netsftp.

But now when i upgraded, this fails.

I can do ssh using putty to these boxes, but through script it is
fialing.

Any help how i  can have this working?

Bhavesh

-- 
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] Closing and opening IE session in watir.

2011-06-07 Thread Bhavesh
Hi,

I have to close IE and open new IE  again in every testcase.

I written an routine like this :

  def setupnew(current_component="")

$ie.close if $ie
sleep(10)
$ie = Watir::IE.new()
sleep(10)

case current_component

  when "WEB_ADMIN"
  $ie.goto($adminLink)

  when "WEB_REPORT"
  $ie.goto($reportLink)

  when "WEB_SEARCH"
  $ie.goto($searchLink)


  else
  #puts "Setup case does not match"
end
  end

This works well in Ruby 1.8

Recently i upgrade to Ruby 1.9.2 and this routine start failing.

It closes the IE if it is open but then not opening the new IE  it
just came out of script throwing error.

Any suggestion how can i use it in 1.9.2?

Bhavesh

-- 
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: getSelectedItems not working on watir-webdriver?!

2011-06-07 Thread a b
I found the solutions that works:

selectedMbType = $browser.select_list(:id =>  "__delivery_main").value

returns the selected item.



ue, Jun 7, 2011 at 2:10 PM, a b  wrote:

> Hello,
>
>
> selectedMbType = $browser.select_list(:id =>
> "__delivery_main").getSelectedItems.to_s
>
> is working on firewatir.
> Now I am using watir-webdriver and i am receiving the following error:
> "
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webdriver/elements/element.rb:292:in
> `method_missing': undefined method `getSelectedItems' for
> # (NoMethodError)"
>
>
> Here is the page code:
> 
> 
> 
> 
>  colspan="2" help="1">Mailbox Settings
> 
> 
> 
>  help="1">Mailbox Type
> 
> 
>  trigger="change" func="switch_delivery_main">
> Mailbox
> Forward
> Filter
> 
> 
>
> The following return the same error message.
>
> selectedMbType = $browser.select_list(:id =>
> "__delivery_main").getSelectedItems.to_s
>
> selectedMbType = $browser.select_list(:id =>  "__delivery_main", :class =>
> "macXfunc").getSelectedItems.to_s
>
> Can one tell me how do I have to fix it in order to run it on
> wator-webdriver.
>
> Thanks a lot,
> Cristina
>

-- 
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] getSelectedItems not working on watir-webdriver?!

2011-06-07 Thread a b
Hello,


selectedMbType = $browser.select_list(:id =>
"__delivery_main").getSelectedItems.to_s

is working on firewatir.
Now I am using watir-webdriver and i am receiving the following error:
"
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webdriver/elements/element.rb:292:in
`method_missing': undefined method `getSelectedItems' for
# (NoMethodError)"


Here is the page code:




Mailbox Settings



Mailbox Type



Mailbox
Forward
Filter



The following return the same error message.

selectedMbType = $browser.select_list(:id =>
"__delivery_main").getSelectedItems.to_s

selectedMbType = $browser.select_list(:id =>  "__delivery_main", :class =>
"macXfunc").getSelectedItems.to_s

Can one tell me how do I have to fix it in order to run it on
wator-webdriver.

Thanks a lot,
Cristina

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

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


Re: [wtr-general] watir-webdriver

2011-06-07 Thread a b
Awesome, is working!

Thanks millions!
Cristina

On Mon, Jun 6, 2011 at 1:38 PM, Jari Bakken  wrote:

> On Mon, Jun 6, 2011 at 6:57 PM, a b 
> wrote:
> >
> > For instance:
> > That is a label :
> > 
> >  > class="macstring">Create User
> >
>
> This isn't valid HTML, as the error message points out. Since the
> parent span is unique, I would in this case start from that and locate
> the first span inside it:
>
>  browser.span(:id => "macbodypage").span.text
>
> Calling #span without arguments assumes you want the first one. If you
> *really* need to locate elements using invalid attributes, you can
> always use an XPath:
>
>  browser.span(:xpath => "//span[@class='macstring' and
> @string='create_user']").text
>
> or iterate through them in Ruby, using Watir::Element#attribute_value
> to get to fetch the invalid attribute:
>
>  span = browser.spans(:class => "macstring").find { |e|
> e.attribute_value("string") == "create_user" }
>  span || raise("couldn't find span")
>
>  span.text
>
> The latest watir-webdriver docs can be found here:
>
>  http://rubydoc.info/gems/watir-webdriver/0.2.4/frames
>
> --
> 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
>

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

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


Re: [wtr-general] Need help calling the column_name in the table while connecting via Oracle DB.

2011-06-07 Thread Željko Filipin
On Tue, Jun 7, 2011 at 3:18 PM, Ashok Tulachan 
wrote:
> I am trying to get the value from the table(employee)connecting through
> the oracle database.

This is Watir support group. You will get more replies if you post this to
Stack Overflow or a general Ruby group.

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

-- 
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] Need help calling the column_name in the table while connecting via Oracle DB.

2011-06-07 Thread Ashok Tulachan
Hi Everyone
,
I am trying to get the value from the table(employee)connecting through
the oracle database. Since there are 100s of values in one column, i would
need to
iterate the table and get the exact value.

I have the code that works if i use the index no. such as row[1] but i
wanted to use the column_name "first name" instead of row[1]. Below is
the code that i have which works.

require 'rubygems'
require 'oci8'
$connection = OCI8.new('usrname', 'password', '//hostname:portno/sid')
person=$connection.exec("SELECT EMP_ID from Employee") do |row|
puts "#{row[1]}"
end

I get the result succesfully but i want to get the result not with
row[1] but with the row with the respective column_name.

Can anybody help me on this? Any little bit of help would be highly
appreciated.

Regards,

Ashok Tulachan

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

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


Re: [wtr-general] FixComputerpProblemsSite Surely Knows How to Fix Computer Problems!

2011-06-07 Thread Željko Filipin
I am not sure how this spam made it to the list, but it is already deleted.
:)

Željko

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

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


[wtr-general] FixComputerpProblemsSite Surely Knows How to Fix Computer Problems!

2011-06-07 Thread Fixcomputerproblems Site
 

I was having problems with my laptop before. Good thing *
FixComputerpProblemsSite* helped me fix it. And they are really the experts 
when it comes to solving any computer related issues. They can easily fix 
computer problems  without breaking 
a sweat. 

*FixComputerProblemsSite *expert computer technicians are very well trained 
to fix computer problems that we as computer users encounter in our PC.  They 
know how to properly diagnose the issues with computers and then give exact 
solutions for the said PC issues. They surely did know how to fix computer 
problems!

So if you need any help with your computer you can always count on 
*FixComputerProblemsSite 
*to fix computer problems that you can have with your PC.

To know more about *FixComputerProblemsSite *computer support services 
call*1-888-216-6589
* or log on to http://www.fixcomputerproblemssite.com

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

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