[wtr-general] Re: accessing tableCell through XPath
try cell = ie.cell(:xpath, //td[contains(., 'Sales')]/) - Angrez On Mon, Mar 16, 2009 at 6:04 PM, Shylaja shylaja.ra...@gmail.com wrote: Hi Iam trying to access the table cell through XPath wiht the following expression cell = ie.td(:xpath, //td[contains(., 'Sales')]/) and get the following error undefined method `td' for #Watir::IE:0x3b94b84 (NoMethodError) Alternately if i change the expression as cell = ie.element_by_xpath(//td[contains(text(), 'All SalesOrders')]/) i always get a return value as NIL. Is there a way to check if the xpath expression is correct? --~--~-~--~~~---~--~~ 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: accessing tableCell through XPath
Angrez When i try to use this expression i get the following error ie.cell(:xpath, //td[contains(., 'Sales')]/).click() `assert_exists': Unable to locate element, using :xpath, //td [contains(., 'Sales')]/ (Watir::Exception::UnknownObjectException) On Mar 16, 5:50 pm, Angrez Singh ang...@gmail.com wrote: try cell = ie.cell(:xpath, //td[contains(., 'Sales')]/) - Angrez On Mon, Mar 16, 2009 at 6:04 PM, Shylaja shylaja.ra...@gmail.com wrote: Hi Iam trying to access the table cell through XPath wiht the following expression cell = ie.td(:xpath, //td[contains(., 'Sales')]/) and get the following error undefined method `td' for #Watir::IE:0x3b94b84 (NoMethodError) Alternately if i change the expression as cell = ie.element_by_xpath(//td[contains(text(), 'All SalesOrders')]/) i always get a return value as NIL. Is there a way to check if the xpath expression is correct? --~--~-~--~~~---~--~~ 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: accessing tableCell through XPath
Try: ie.cell(:xpath, //td[contains(text(), 'Sales')]/).click Thanks. Wesley Chen. On Mon, Mar 16, 2009 at 8:56 PM, Shylaja shylaja.ra...@gmail.com wrote: ie.cell(:xpath, //td[contains(., 'Sales')]/).click() --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---