[wtr-general] Re: Cannot use the index in SafariWatir

2009-10-02 Thread yuping zhong

Doesn't work. See the following:

sf.button(:index,"1").click
NoMethodError: undefined method `-' for "1":String
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.3/./
safariwatir/scripter.rb:395:in `operate_by_index'
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.3/./
safariwatir.rb:130:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.3/./
safariwatir.rb:130:in `operate'
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.3/./
safariwatir/scripter.rb:161:in `highlight'
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.3/./
safariwatir.rb:47:in `click'
from (irb):16
from :0

On Sep 30, 4:10 pm, Željko Filipin 
wrote:
> On Wed, Sep 30, 2009 at 4:45 AM, yuping zhong 
> wrote:
>
> > irb(main):013:0> sf.button(:index=>"1").click
>
> Does this work?
>
> sf.button(:index, "1").click
>
> Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: adding utf-8 character to text fields

2009-10-02 Thread Loft_Tester

Thanks that worked great

On Oct 2, 9:33 am, Željko Filipin 
wrote:
> On Fri, Oct 2, 2009 at 3:09 PM, Loft_Tester  wrote:
> > adding
> > myself as a contributer of documentation is not going well at all.
> > Would one of you guys give me a quick tutorial.
>
> - log in to wiki
> - go tohttp://wiki.openqa.org/display/WTR/Contributors
> - click `Edit` (top lef)
> - click `Wiki Markup` (left) - optional, I just do not like to work with
> rich text
> - find:
>
> "- [Karim Rayani|~karim.goa]
> -- Updated [Watir Methods Supported by HTML Element]"
>
> - add under it (remove quotes):
>
> "- [Aaron Roy|~lofttester]
> -- Created [Adding UTF-8 characters to text fields]"
>
> - click `Preview` - optional, just to make sure everything looks fine
> - in `Comment` text box (bottom left) enter something like (remove quotes):
> `added myself to documentation contributors`
> - click `Save` (bottom right)
> - click `(view 
> change
> )` - optional, just to take a quick look what is actually changed
>
> Please let me know if you need more help with the wiki.
>
> Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Checking if link exists

2009-10-02 Thread Shlomit Gazit

Thanks.
I realized I had to use .innerText



On Oct 2, 11:06 am, karim rayani  wrote:
> Hi
>
> try this syntax
>
> 
>
> require "watir"
> test_site = "http://www.google.com";
> ie = Watir::IE.new
> ie.goto test_site
> puts ie.link(:index,"1").to_s
> *puts ie.link(:index,"1").href*
> # above is the href property to extract the href value from the hyperlink
> sleep(10)
>
> ie.close
>
> 
>
> Thanx
>
> Karim Rayani
>
> http://karimnumerouno.wordpress.com
>
> On Fri, Oct 2, 2009 at 9:28 AM, Shlomit Gazit 
> wrote:
>
>
>
>
>
> > Hello,
> > I want to check if a link exists in the page.
> > I dont know what the content text of the link is, but I know the url.
>
> > The procedure is:
>
> > I want to set a filter with a certain text and clicking on the filter,
> > it suppose to return nothing, that's how I will see that it is working
> > well.
--~--~-~--~~~---~--~~
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: Checking if link exists

2009-10-02 Thread karim rayani
Hi

try this syntax



require "watir"
test_site = "http://www.google.com";
ie = Watir::IE.new
ie.goto test_site
puts ie.link(:index,"1").to_s
*puts ie.link(:index,"1").href*
# above is the href property to extract the href value from the hyperlink
sleep(10)

ie.close




Thanx

Karim Rayani

http://karimnumerouno.wordpress.com

On Fri, Oct 2, 2009 at 9:28 AM, Shlomit Gazit 
wrote:
>
> Hello,
> I want to check if a link exists in the page.
> I dont know what the content text of the link is, but I know the url.
>
> The procedure is:
>
> I want to set a filter with a certain text and clicking on the filter,
> it suppose to return nothing, that's how I will see that it is working
> well.
>
> >
>

--~--~-~--~~~---~--~~
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] Click ok on popup

2009-10-02 Thread Shlomit Gazit

For handling prompt popups, I am using myClicker.rb file:
___

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
__FILE__

require 'watir/WindowHelper'

$helper = WindowHelper.new
$helper.push_confirm_button_ok()



I am calling this file like this:
__

Thread.new { system("rubyw myClicker.rb") }
$ie.image(:name, /elete/).click
Thread.new { system("rubyw myClicker.rb") }

What I am trying to do above is deleting an object. I am getting first
popup asking if I really want to delete this and then a second popup
prompt to enter the reason. Both need to click 'ok' button.


It is working partly:
The problem is that most of the time I have to manually click on ok
button.


--~--~-~--~~~---~--~~
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] Checking if link exists

2009-10-02 Thread Shlomit Gazit

Hello,
I want to check if a link exists in the page.
I dont know what the content text of the link is, but I know the url.

The procedure is:

I want to set a filter with a certain text and clicking on the filter,
it suppose to return nothing, that's how I will see that it is working
well.

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



[wtr-general] watir tests are not passing on my environment

2009-10-02 Thread Shlomit Gazit

Hello,

I have one watir environment that is well functioning (that I didn't
set up).
I was trying to set up a new watir environment but somehow the tests
that are running on the good environment are not running on the new
environment.

For example, a test that is well running on one environment is
breaking on the new environment when trying to find a url with regular
expression.

I am not sure if it is problem of IE. The working environment is IE
7.0.6001 256bit.

The new one is IE 7.0.5 but I couldn't find the right update (there is
only IE8 update).

The new environment is up to date with watir.

Any ideas?

Shlomit.


--~--~-~--~~~---~--~~
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: adding utf-8 character to text fields

2009-10-02 Thread Željko Filipin
On Fri, Oct 2, 2009 at 3:09 PM, Loft_Tester  wrote:
> adding
> myself as a contributer of documentation is not going well at all.
> Would one of you guys give me a quick tutorial.

- log in to wiki
- go to http://wiki.openqa.org/display/WTR/Contributors
- click `Edit` (top lef)
- click `Wiki Markup` (left) - optional, I just do not like to work with
rich text
- find:

"- [Karim Rayani|~karim.goa]
-- Updated [Watir Methods Supported by HTML Element]"

- add under it (remove quotes):

"- [Aaron Roy|~lofttester]
-- Created [Adding UTF-8 characters to text fields]"

- click `Preview` - optional, just to make sure everything looks fine
- in `Comment` text box (bottom left) enter something like (remove quotes):
`added myself to documentation contributors`
- click `Save` (bottom right)
- click `(view 
change
)` - optional, just to take a quick look what is actually changed

Please let me know if you need more help with the wiki.

Željko

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



[wtr-general] Re: adding utf-8 character to text fields

2009-10-02 Thread Loft_Tester

I feel like I'm taking the short bus to wiki school. I believe I
figured out how to add my example to the correct place but adding
myself as a contributer of documentation is not going well at all.
Would one of you guys give me a quick tutorial.  That would be great
thanks.

On Oct 1, 10:42 am, Željko Filipin 
wrote:
> On Thu, Oct 1, 2009 at 4:30 PM, Loft_Tester  wrote:
> > I do not see it appear in examples.
>
> Fixed.
>
> I have moved it from child of Examples page to child of Advanced Examples.
> Examples page is autogenerated, and shows only childen of it's children.
> Take a look at page source if you want to know more.
>
> http://wiki.openqa.org/display/WTR/Examples
>
> Thanks for the contribution. Please add yourself to documentation
> contributors at:
>
> http://wiki.openqa.org/display/WTR/Contributors
>
> Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: adding utf-8 character to text fields

2009-10-02 Thread Loft_Tester

This may cause issues for some of our test where we are using high
ascii characters not encoded in UTF-8.  All of our test are data
driven through excel we may just have to change the values to be UTF-8
encoded.  Is there any Idea when the next version of watir is due out

On Oct 2, 8:07 am, Željko Filipin 
wrote:
> On Thu, Oct 1, 2009 at 8:36 PM, Jari Bakken  wrote:
> > Actually, UTF-8 is the default in Watir
>
> Jari,
>
> can you please update the page? I am not sure what to do.
>
> Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: adding utf-8 character to text fields

2009-10-02 Thread Željko Filipin
On Thu, Oct 1, 2009 at 8:36 PM, Jari Bakken  wrote:
> Actually, UTF-8 is the default in Watir

Jari,

can you please update the page? I am not sure what to do.

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