First a big thanks to Charley for replying to my previous post.  I
have managed to methodically isolate the target element in the AUT.
Now I am uncertain how to click on the text string.

If interested, below is the code I used to isolate the target string.

Now that I have isolated the target string I am not sure how to click
the string.

I attempted to use xpath.

@ie.frame("sectionFrame").table(:index,1).cell(:xpath,
'mnuItem1').click

I get the following error.

Any thoughts would be greatly appreciated.

Carl

------------------------------
error------------------------------------------------

NoMethodError: undefined method `element_by_xpath' for #<Watir::Table:
0x82adca0>
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:
324:in `locate'
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:49:in `assert_exists'
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:229:in `click!'
    C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:215:in `click'
    C:/apps/eclipse/SCPT Test/test/Functional/CSM5Test.rb:96:in
`test1'



-----------------------------tedious
code---------------------------------------------------------

          assert( @ie.frame("labelFrame").table(:id,
'mnuTable').exists?)
          rows = @ie.frame("labelFrame").table(:id,
'mnuTable').row_count()
          columns = @ie.frame("labelFrame").table(:id,
'mnuTable').column_count()
          puts "table rows  " + rows.to_s
          puts "table columns  " + columns.to_s

          myTable = @ie.frame("labelFrame").table(:index,1)
                test1 = myTable[1][2].to_s
                puts "my column value  "  + test1.to_s

          assert( @ie.frame("sectionFrame").table(:class,
'topSubMenuTitleBar').exists?)

          rows2 = @ie.frame("sectionFrame").table(:class,
'topSubMenuTitleBar').row_count()
          puts "Row2  " + rows2.to_s
          columns2 = @ie.frame("sectionFrame").table(:class,
'topSubMenuTitleBar').column_count()
          puts "columns2  " + columns2.to_s

          myTable2 = @ie.frame("sectionFrame").table(:index,1)
                test2 = myTable2[1][1].to_s
                puts "my column2 value  "  + test2.to_s
          assert(@ie.frame("sectionFrame").table(:index,1).cell(:id,
'mnuItem1').exists?)
     #     @ie.frame("sectionFrame").table(:index,1).cell(:id,
'mnuItem1').link(:text,/i18nTraining/).click
          content = @ie.frame("sectionFrame").table(:index,1).cell
(:id, 'mnuItem1').text.strip

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

Reply via email to