I got it fixed ;). Thanks guys, much simpler than I thought. fr = browser.frame( :id, "Main_Body" ) fr.checkbox( :id, "cblModules_0" ).clear
So this problem is only with "frame"? Is there any other element that we have to do this kind of "nested call" ? What's the easiest way to access an element? What's the most usable way to access an element? I asked this because when I use Selenium, I often use "xpath", but "xpath" seems very brittle, any changes to the element can break the test code. I would appreciate any feedback or recommendation. Thanks ;) On Thu, Aug 12, 2010 at 8:36 PM, Chan Nguyen <atbl1...@gmail.com> wrote: > Hi all, > I think my situation is really bad, I check the HTML code. The nesting > level is very high. I check most of the tutorial, the example is so simple, > while my case is so complex :( ! Can anyone help me to access the check box > element in my case. Thank. ( HTML from firebug is attached ) > > > > On Thu, Aug 12, 2010 at 5:35 PM, orde <ohil...@gmail.com> wrote: > >> Search this group for <iframe>: >> >> http://groups.google.com/group/watir-general/search?group=watir-general&q=%3Ciframe%3E&qt_g=Search+this+group >> >> Or check the tutorial: >> http://wiki.openqa.org/display/WTR/Printable+Tutorial >> and >> http://wiki.openqa.org/display/WTR/Printable+Tutorial#PrintableTutorial-Frames >> >> On Aug 12, 4:34 pm, Chan Nguyen <atbl1...@gmail.com> wrote: >> > Hi Ethan, >> > >> > Can you show me an example, I saw a Frame in Firebug. I couldn't copy >> the >> > whole HTML when viewing with FB, so weird. >> > <iframe frameborder="0" onload="setUnload()" >> > src="customizehomepage.aspx?hidMLS=SDNA" class="MainBody" >> name="Main_Body" >> > id="Main_Body" style="height: 124px;"></iframe> >> > And those checkboxes are nested into 2 more tables :(. How can I deal >> with >> > these kind of situations ? >> > >> > >> > >> > On Thu, Aug 12, 2010 at 3:47 PM, Ethan <notet...@gmail.com> wrote: >> > > deep nesting with most elements is no issue, but there is some mention >> of a >> > > frame there. if it's inside a frame, then you'll need to access the >> frame >> > > first, then the checkbox in the frame. >> > >> > > On Thu, Aug 12, 2010 at 18:42, Chan Nguyen <atbl1...@gmail.com> >> wrote: >> > >> > >> This is what I copied when using TestWise Recorder : >> > >> # can't yet handle followFrame >> > >> browser.checkbox(:id, "cblModules_0").clear >> > >> browser.checkbox(:id, "cblModules_1").clear >> > >> > >> browser.checkbox(:id, "cblModules_2").clear >> > >> browser.checkbox(:id, "cblModules_3").clear >> > >> > >> I think the reason that it failed because it's nested really deep. I >> can >> > >> see a huge <tr><td> slope when viewing with Firebug. Is there another >> way to >> > >> get around this issue? Thanks >> > >> > >> On Thu, Aug 12, 2010 at 3:28 PM, Chan Nguyen <atbl1...@gmail.com> >> wrote: >> > >> > >>> Hi Arihan, >> > >>> Yes, I checked the id name carefully. I don't really know why it >> failed, >> > >>> too obvious to be right :( >> > >>> Thanks, >> > >> > >>> On Thu, Aug 12, 2010 at 3:04 PM, arihan sinha < >> arihan.si...@gmail.com>wrote: >> > >> > >>>> Have you given the correct id name? >> > >> > >>>> it seems from html code the id is *cblModules_2* but you have used >> i* >> > >>>> cblModules_0* >> > >> > >>>> On Thu, Aug 12, 2010 at 10:15 PM, Chan Nguyen <atbl1...@gmail.com >> >wrote: >> > >> > >>>>> Hi everyone, >> > >>>>> I followed a very simple example in Watir tutorial website >> > >>>>>http://wiki.openqa.org/display/WTR/Checkboxes. >> > >>>>> Here is the element HTML code: >> > >>>>> <input type="checkbox" checked="checked" name="cblModules:2" >> > >>>>> id="cblModules_2"> >> > >>>>> Then I tried >> > >>>>> browser.checkbox( :id, 'icblModules_0' ).clear >> > >>>>> but the compiler keeps complaining : >> > >> > >>>>> >> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: >> > >>>>> 56:in `assert_exists': Unable to locate element, using :id, >> > >>>>> "icblModules_0" (Watir::Exception::UnknownObjectException) >> > >> > >>>>> Any idea? >> > >> > >>>>> Thanks, >> > >> > >>>>> -- >> > >>>>> Before posting, please readhttp://watir.com/support. In short: >> search >> > >>>>> before you ask, be nice. >> > >> > >>>>> You received this message because you are subscribed to >> > >>>>>http://groups.google.com/group/watir-general >> > >>>>> To post: watir-general@googlegroups.com >> > >>>>> To unsubscribe: >> > >>>>> watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> >> <watir-general%2bunsubscr...@goog legroups.com> >> > >> > >>>> -- >> > >>>> Before posting, please readhttp://watir.com/support. In short: >> search >> > >>>> before you ask, be nice. >> > >> > >>>> You received this message because you are subscribed to >> > >>>>http://groups.google.com/group/watir-general >> > >>>> To post: watir-general@googlegroups.com >> > >>>> To unsubscribe: >> > >>>> watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> >> <watir-general%2bunsubscr...@goog legroups.com> >> > >> > >> -- >> > >> Before posting, please readhttp://watir.com/support. In short: >> search >> > >> before you ask, be nice. >> > >> > >> You received this message because you are subscribed to >> > >>http://groups.google.com/group/watir-general >> > >> To post: watir-general@googlegroups.com >> > >> To unsubscribe: >> > >> watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> >> <watir-general%2bunsubscr...@goog legroups.com> >> > >> > > -- >> > > Before posting, please readhttp://watir.com/support. In short: search >> > > before you ask, be nice. >> > >> > > You received this message because you are subscribed to >> > >http://groups.google.com/group/watir-general >> > > To post: watir-general@googlegroups.com >> > > To unsubscribe: >> > > watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> >> <watir-general%2bunsubscr...@goog legroups.com> >> >> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> You received this message because you are subscribed to >> http://groups.google.com/group/watir-general >> To post: watir-general@googlegroups.com >> To unsubscribe: >> watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> >> > > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com