After I enter value to the td manually, I can read the value using the same
code. So there are no issues with index. I can reach to the table using
that code. Even if I click manually on the td, the text box inside td is
appearing and I can successfully run the second line alone and I can pass.
The problem here is I am not able to trigger the click event on td. The
table has been created on the page as editable html using javascipt. When
we click on table cell, that cell becomes editable.
On Jun 9, 2016 1:23 PM, "Super Kevy" <[email protected]> wrote:

Looks like your table ID is not a string.  You may have meant to use index.
Your index may be zero based, I don't recall what 1.8.6 used.
If you can use chrome's inspector (or your browsers inspector) to help
figure out IDs and Names of elements it makes life easier.

Check table within http://relevantcodes.com/watir-webdriver-cheat-sheet/

When in doubt use .exists?  to confirm an element is there.


puts $ie.frame(:index=>1).exists?   # We expect to see true
puts $ie.frame(:index=>1).table(:id=>'1').exists?    # We expect to see
true
# Using pure index
$ie.frame(:index=>1).table(:index=>1)[1][1].click
sleep 2   # Give it time to display!!!  Wait_until_present is not a feature
in 1.8.6
$ie.frame(:index=> 1).table(:index => 1)[1][1].click  #Click the table cell
$ie.frame(:index=> 1).table(:index
=> 1)[1][1].text_field(:class=>"form-ctrl",:id=>"I'd").click
$ie.frame(:index=> 1).table(:index
=> 1)[1][1].text_field(:class=>"form-ctrl",:id=>"I'd").set('hello')



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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to