these dont seem to work either!!!!
**********************************************
Using ie.cell(:text, /Areas And Branches/).click
**********************************************
E
Finished in 1.734 seconds.
1) Error:
test_TCrecorded(TCrecorded):
Watir::Exception::UnknownObjectException: Unable to locate element,
using :text,
/Areas And Branches/
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
52:in `asser
t_exists'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
284:in `enab
led?'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
56:in `asser
t_enabled'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
229:in `clic
k!'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
215:in `clic
k'
D:/Installers/watir/experimenting/JMP_CreateBranch.rb:54:in
`test_TCrecorded
-----------------------------
and when used (changed the double quotes to single around areas and
branches as it was giving a syntax error)
ie.element_by_xpath("//td[contains(.,'Areas And Branches')]").click
1) Error:
test_TCrecorded(TCrecorded):
NoMethodError: undefined method `click' for nil:NilClass
D:/Installers/watir/experimenting/JMP_CreateBranch.rb:50:in
`test_TCrecorded
'
1 tests, 0 assertions, 0 failures, 1 errors
On Sep 8, 5:10 pm, Angrez Singh <[email protected]> wrote:
> does this works:
> ie.cell(:text, /Areas And Branches/).click
>
> or this:
> ie.element_by_xpath("//td[contains(., "Areas And Branches")]").click
>
> - Angrez
>
>
>
> On Tue, Sep 8, 2009 at 5:03 PM, rs77 <[email protected]> wrote:
>
> > still no luck :(
>
> > 1) Error:
> > test_TCrecorded(TCrecorded):
> > NoMethodError: undefined method `element_by_xpath' for #<Watir::Frame:
> > 0x2e55054>
>
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:
> > 324:in `locate'
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> > 49:in `assert_exists'
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> > 284:in `enabled?'
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> > 56:in `assert_enabled'
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> > 229:in `click!'
> > C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> > 215:in `click!'
>
> > Am i missing something basic, do i need to require anything else for
> > using xpath?
>
> > On Sep 8, 4:24 pm, Željko Filipin <[email protected]>
> > wrote:
> > >http://wiki.openqa.org/display/WTR/XPathsays:
>
> > > "you can access frames using the attributes that Watir provides but you
> > > can't use xpath attribute for accessing frames"
>
> > > Try this:
>
> > > browser.frame(:index, 3).cell(:xpath, "//td[contains(@onclick ,
> > > 'MainMenu.jmp?pid=97&pName=Areas And Branches')]").click
>
> > > Željko- 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 [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---