[wtr-general] Re: Xpath cell
I think xpath is generally considered a last resort by most people. To me it seems very brittle. If the layout of your page changes a lot of your code will break. Using IDs to locate elements is usually your best choice I believe. On Jan 27, 12:07 pm, Bharath wrote: > Željko, > Thank you very much. > $browser.cell(:class=>'rptName').text worked for me. > but i when I have time i will try to work with xpath. > > Thanks again > BK > > On Wed, Jan 27, 2010 at 11:31 AM, Željko Filipin < > > zeljko.fili...@wa-research.ch> wrote: > > On Wed, Jan 27, 2010 at 5:25 PM, Bharath wrote: > > > $browser.cell(:xpath, "//t...@class='rptName']/") > > > Watir::Exception::UnknownObjectException: Unable to locate element, using > > :xpath, "//t...@class='rptName']" > > > XPath is black magic to me. I rarely use it and I always have to look up > > the syntax, and I do not have the time at the moment. > > > Try this: > > > browser.cell(:class => "rptName").text > > > If the cell is child of any element that could be uniquely identified, you > > could use something like this: > > > browser.element(how => what).cell(:class => "rptName").text > > > Željko > > > -- > > 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 -- 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
Re: [wtr-general] Re: XPath Support in Frame
Hi Kunal, I didn't get enough time to look into the issue. I'll surely get something done this week end. - Angrez On Fri, Jan 15, 2010 at 10:22 AM, Kunal wrote: > Yes. That's what it looks right now. > > Question is - Can this be supported? May be Angrez can throw some > light. > > -Kunal > > On Jan 15, 6:20 am, Wesley Chen wrote: > > I think the xpath is not supported when in a frame. > > > > Thanks. > > Wesley Chen. > > For life, the easier, the better. > > > > On Thu, Jan 14, 2010 at 10:04 PM, Kunal wrote: > > > Hi Angrez, > > > > > Do you think this issue can be solved ? > > > > > -Kunal > > > > > On Jan 11, 12:33 pm, Wesley Chen wrote: > > > > I met with this kind of problem, too. > > > > In fact, when I user IE developer toolbar to access the web page with > the > > > > source code above, the IFRAME won't expand. > > > > The IFrame is with src attributes, it points to the other place, > which > > > > crosses the domain, so we have no access. > > > > > > Thanks. > > > > Wesley Chen. > > > > For life, the easier, the better. > > > > > > On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh > wrote: > > > > > Thanks a lot for the HTML source .. it is sufficient. Will look > into > > > the > > > > > issue and resolve it. > > > > > > > - Angrez > > > > > > > 2010/1/9 Kunal > > > > > > > Well, the HTML doc is quite big! You would not want to dig into > > > > >> that ;) > > > > > > >> Anyways I tried to remove most of the redundant things and the > > > > >> skeleton HTML does look something like as below > > > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> Some content here > > > > >>http://dummy-url";> > > > > >> > > > > >> > > > > >> Test test > > > > >> > > > > >> lkdsjlakjds > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > > > >> If this helps, great. If you need more information, please let me > > > > >> know. > > > > > > >> -Kunal > > > > > > >> On Jan 9, 6:48 pm, Angrez Singh wrote: > > > > >> > I'll look into this .. above should work .. meanwhile can you > send > > > me > > > > >> the > > > > >> > HTML you are using? > > > > > > >> > - Angrez > > > > > > >> > On Sat, Jan 9, 2010 at 3:18 PM, Kunal > wrote: > > > > >> > > No. They don't. See the error which I get, If I try to do > > > something > > > > >> > > like that. > > > > > > >> > > irb(main):025:0> browser.frame( :id, "test-339" ).span( > :xpath, > > > > >> "//span > > > > >> > > [...@text='Root Node']" ).focus > > > > > > >> > > NoMethodError: undefined method `element_by_xpath' for > > > # > > > >> > > 0x32f24f4> > > > > > > >> > >from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > >> > > non_control_elements.rb:20:in `locate' > > > > >> > >from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > >> > > element.rb:49:in `assert_exists' > > > > >> > >from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > >> > > element.rb:284:in `enabled?' > > > > >> > >from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > >> > > element.rb:56:in `assert_enabled' > > > > >> > >from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > >> > > element.rb:266:in `focus' > > > > >> > >from (irb):25 > > > > > > >> > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > > > >> > > > Correct as Željko said it should work? > > > > > > >> > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > > > >> > > > zeljko.fili...@wa-research.ch> wrote: > > > > >> > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar < > > > kunal...@gmail.com > > > > > > >> > > wrote: > > > > >> > > > > > $ie.frame(:index, 3).span( :xpath, > > > "//d...@id='test']/../span" > > > > >> > > ).click > > > > >> > > > > > would fail with error. > > > > > > >> > > > > That should work. What error do you get? > > > > > > >> > > > > Take a look: > > > > > > >> > > > >http://wiki.openqa.org/display/WTR/XPath > > > > > > >> > > > > "...you can access frames using the attributes that Watir > > > provides > > > > >> but > > > > >> > > you > > > > >> > > > > can't use *xpath* attribute for accessing frames..." > > > > > > >> > > > > Željko > > > > >> > > > > -- > > > > >> > > > > watir.com - community manager > > > > >> > > > > watirpodcast.com - host > > > > > > >> > > > > -- > > > > >> > > > > 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.co
[wtr-general] Re: XPath Support in Frame
Yes. That's what it looks right now. Question is - Can this be supported? May be Angrez can throw some light. -Kunal On Jan 15, 6:20 am, Wesley Chen wrote: > I think the xpath is not supported when in a frame. > > Thanks. > Wesley Chen. > For life, the easier, the better. > > On Thu, Jan 14, 2010 at 10:04 PM, Kunal wrote: > > Hi Angrez, > > > Do you think this issue can be solved ? > > > -Kunal > > > On Jan 11, 12:33 pm, Wesley Chen wrote: > > > I met with this kind of problem, too. > > > In fact, when I user IE developer toolbar to access the web page with the > > > source code above, the IFRAME won't expand. > > > The IFrame is with src attributes, it points to the other place, which > > > crosses the domain, so we have no access. > > > > Thanks. > > > Wesley Chen. > > > For life, the easier, the better. > > > > On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh wrote: > > > > Thanks a lot for the HTML source .. it is sufficient. Will look into > > the > > > > issue and resolve it. > > > > > - Angrez > > > > > 2010/1/9 Kunal > > > > > Well, the HTML doc is quite big! You would not want to dig into > > > >> that ;) > > > > >> Anyways I tried to remove most of the redundant things and the > > > >> skeleton HTML does look something like as below > > > > >> > > > >> > > > >> > > > >> > > > >> Some content here > > > >> http://dummy-url";> > > > >> > > > >> > > > >> Test test > > > >> > > > >> lkdsjlakjds > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > > >> If this helps, great. If you need more information, please let me > > > >> know. > > > > >> -Kunal > > > > >> On Jan 9, 6:48 pm, Angrez Singh wrote: > > > >> > I'll look into this .. above should work .. meanwhile can you send > > me > > > >> the > > > >> > HTML you are using? > > > > >> > - Angrez > > > > >> > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > > > >> > > No. They don't. See the error which I get, If I try to do > > something > > > >> > > like that. > > > > >> > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, > > > >> "//span > > > >> > > [...@text='Root Node']" ).focus > > > > >> > > NoMethodError: undefined method `element_by_xpath' for > > # > > >> > > 0x32f24f4> > > > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > >> > > non_control_elements.rb:20:in `locate' > > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > >> > > element.rb:49:in `assert_exists' > > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > >> > > element.rb:284:in `enabled?' > > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > >> > > element.rb:56:in `assert_enabled' > > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > >> > > element.rb:266:in `focus' > > > >> > > from (irb):25 > > > > >> > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > > >> > > > Correct as Željko said it should work? > > > > >> > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > >> > > > zeljko.fili...@wa-research.ch> wrote: > > > >> > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar < > > kunal...@gmail.com > > > > >> > > wrote: > > > >> > > > > > $ie.frame(:index, 3).span( :xpath, > > "//d...@id='test']/../span" > > > >> > > ).click > > > >> > > > > > would fail with error. > > > > >> > > > > That should work. What error do you get? > > > > >> > > > > Take a look: > > > > >> > > > >http://wiki.openqa.org/display/WTR/XPath > > > > >> > > > > "...you can access frames using the attributes that Watir > > provides > > > >> but > > > >> > > you > > > >> > > > > can't use *xpath* attribute for accessing frames..." > > > > >> > > > > Željko > > > >> > > > > -- > > > >> > > > > watir.com - community manager > > > >> > > > > watirpodcast.com - host > > > > >> > > > > -- > > > >> > > > > 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 > > > > >> > > -- > > > >> > > 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 > > > >>
Re: [wtr-general] Re: XPath Support in Frame
I think the xpath is not supported when in a frame. Thanks. Wesley Chen. For life, the easier, the better. On Thu, Jan 14, 2010 at 10:04 PM, Kunal wrote: > Hi Angrez, > > Do you think this issue can be solved ? > > -Kunal > > On Jan 11, 12:33 pm, Wesley Chen wrote: > > I met with this kind of problem, too. > > In fact, when I user IE developer toolbar to access the web page with the > > source code above, the IFRAME won't expand. > > The IFrame is with src attributes, it points to the other place, which > > crosses the domain, so we have no access. > > > > Thanks. > > Wesley Chen. > > For life, the easier, the better. > > > > On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh wrote: > > > Thanks a lot for the HTML source .. it is sufficient. Will look into > the > > > issue and resolve it. > > > > > - Angrez > > > > > 2010/1/9 Kunal > > > > > Well, the HTML doc is quite big! You would not want to dig into > > >> that ;) > > > > >> Anyways I tried to remove most of the redundant things and the > > >> skeleton HTML does look something like as below > > > > >> > > >> > > >> > > >> > > >> Some content here > > >>http://dummy-url";> > > >> > > >> > > >> Test test > > >> > > >> lkdsjlakjds > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > > > >> If this helps, great. If you need more information, please let me > > >> know. > > > > >> -Kunal > > > > >> On Jan 9, 6:48 pm, Angrez Singh wrote: > > >> > I'll look into this .. above should work .. meanwhile can you send > me > > >> the > > >> > HTML you are using? > > > > >> > - Angrez > > > > >> > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > > >> > > No. They don't. See the error which I get, If I try to do > something > > >> > > like that. > > > > >> > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, > > >> "//span > > >> > > [...@text='Root Node']" ).focus > > > > >> > > NoMethodError: undefined method `element_by_xpath' for > # > >> > > 0x32f24f4> > > > > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > >> > > non_control_elements.rb:20:in `locate' > > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > >> > > element.rb:49:in `assert_exists' > > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > >> > > element.rb:284:in `enabled?' > > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > >> > > element.rb:56:in `assert_enabled' > > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > >> > > element.rb:266:in `focus' > > >> > >from (irb):25 > > > > >> > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > >> > > > Correct as Željko said it should work? > > > > >> > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > >> > > > zeljko.fili...@wa-research.ch> wrote: > > >> > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar < > kunal...@gmail.com > > > > >> > > wrote: > > >> > > > > > $ie.frame(:index, 3).span( :xpath, > "//d...@id='test']/../span" > > >> > > ).click > > >> > > > > > would fail with error. > > > > >> > > > > That should work. What error do you get? > > > > >> > > > > Take a look: > > > > >> > > > >http://wiki.openqa.org/display/WTR/XPath > > > > >> > > > > "...you can access frames using the attributes that Watir > provides > > >> but > > >> > > you > > >> > > > > can't use *xpath* attribute for accessing frames..." > > > > >> > > > > Željko > > >> > > > > -- > > >> > > > > watir.com - community manager > > >> > > > > watirpodcast.com - host > > > > >> > > > > -- > > >> > > > > 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 > > > > >> > > -- > > >> > > 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 > > > > >> -- > > >> You received this message because you are subscribed to the Google > Groups > > >> "Watir General" group. > > >> To po
[wtr-general] Re: XPath Support in Frame
Hi Angrez, Do you think this issue can be solved ? -Kunal On Jan 11, 12:33 pm, Wesley Chen wrote: > I met with this kind of problem, too. > In fact, when I user IE developer toolbar to access the web page with the > source code above, the IFRAME won't expand. > The IFrame is with src attributes, it points to the other place, which > crosses the domain, so we have no access. > > Thanks. > Wesley Chen. > For life, the easier, the better. > > On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh wrote: > > Thanks a lot for the HTML source .. it is sufficient. Will look into the > > issue and resolve it. > > > - Angrez > > > 2010/1/9 Kunal > > > Well, the HTML doc is quite big! You would not want to dig into > >> that ;) > > >> Anyways I tried to remove most of the redundant things and the > >> skeleton HTML does look something like as below > > >> > >> > >> > >> > >> Some content here > >> http://dummy-url";> > >> > >> > >> Test test > >> > >> lkdsjlakjds > >> > >> > >> > >> > >> > >> > >> > > >> If this helps, great. If you need more information, please let me > >> know. > > >> -Kunal > > >> On Jan 9, 6:48 pm, Angrez Singh wrote: > >> > I'll look into this .. above should work .. meanwhile can you send me > >> the > >> > HTML you are using? > > >> > - Angrez > > >> > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > >> > > No. They don't. See the error which I get, If I try to do something > >> > > like that. > > >> > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, > >> "//span > >> > > [...@text='Root Node']" ).focus > > >> > > NoMethodError: undefined method `element_by_xpath' for # >> > > 0x32f24f4> > > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > >> > > non_control_elements.rb:20:in `locate' > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > >> > > element.rb:49:in `assert_exists' > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > >> > > element.rb:284:in `enabled?' > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > >> > > element.rb:56:in `assert_enabled' > >> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > >> > > element.rb:266:in `focus' > >> > > from (irb):25 > > >> > > On Jan 8, 3:45 pm, Angrez Singh wrote: > >> > > > Correct as Željko said it should work? > > >> > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > >> > > > zeljko.fili...@wa-research.ch> wrote: > >> > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar > >> > > wrote: > >> > > > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" > >> > > ).click > >> > > > > > would fail with error. > > >> > > > > That should work. What error do you get? > > >> > > > > Take a look: > > >> > > > >http://wiki.openqa.org/display/WTR/XPath > > >> > > > > "...you can access frames using the attributes that Watir provides > >> but > >> > > you > >> > > > > can't use *xpath* attribute for accessing frames..." > > >> > > > > Željko > >> > > > > -- > >> > > > > watir.com - community manager > >> > > > > watirpodcast.com - host > > >> > > > > -- > >> > > > > 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 > > >> > > -- > >> > > 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 > > >> -- > >> 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 > > > -- > > You received this message because you are subscribed to the Google Groups > > "Watir General" group. > > To pos
Re: [wtr-general] Re: XPath Support in Frame
I met with this kind of problem, too. In fact, when I user IE developer toolbar to access the web page with the source code above, the IFRAME won't expand. The IFrame is with src attributes, it points to the other place, which crosses the domain, so we have no access. Thanks. Wesley Chen. For life, the easier, the better. On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh wrote: > Thanks a lot for the HTML source .. it is sufficient. Will look into the > issue and resolve it. > > - Angrez > > 2010/1/9 Kunal > > Well, the HTML doc is quite big! You would not want to dig into >> that ;) >> >> Anyways I tried to remove most of the redundant things and the >> skeleton HTML does look something like as below >> >> >> >> >> >> Some content here >>http://dummy-url";> >> >> >> Test test >> >> lkdsjlakjds >> >> >> >> >> >> >> >> >> If this helps, great. If you need more information, please let me >> know. >> >> -Kunal >> >> On Jan 9, 6:48 pm, Angrez Singh wrote: >> > I'll look into this .. above should work .. meanwhile can you send me >> the >> > HTML you are using? >> > >> > - Angrez >> > >> > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: >> > > No. They don't. See the error which I get, If I try to do something >> > > like that. >> > >> > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, >> "//span >> > > [...@text='Root Node']" ).focus >> > >> > > NoMethodError: undefined method `element_by_xpath' for #> > > 0x32f24f4> >> > >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ >> > > non_control_elements.rb:20:in `locate' >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ >> > > element.rb:49:in `assert_exists' >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ >> > > element.rb:284:in `enabled?' >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ >> > > element.rb:56:in `assert_enabled' >> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ >> > > element.rb:266:in `focus' >> > >from (irb):25 >> > >> > > On Jan 8, 3:45 pm, Angrez Singh wrote: >> > > > Correct as Željko said it should work? >> > >> > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < >> > >> > > > zeljko.fili...@wa-research.ch> wrote: >> > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar > > >> > > wrote: >> > > > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" >> > > ).click >> > > > > > would fail with error. >> > >> > > > > That should work. What error do you get? >> > >> > > > > Take a look: >> > >> > > > >http://wiki.openqa.org/display/WTR/XPath >> > >> > > > > "...you can access frames using the attributes that Watir provides >> but >> > > you >> > > > > can't use *xpath* attribute for accessing frames..." >> > >> > > > > Željko >> > > > > -- >> > > > > watir.com - community manager >> > > > > watirpodcast.com - host >> > >> > > > > -- >> > > > > 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 >> > >> > > -- >> > > 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 >> >> -- >> 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 >> > > > -- > 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, vis
Re: [wtr-general] Re: XPath Support in Frame
Thanks a lot for the HTML source .. it is sufficient. Will look into the issue and resolve it. - Angrez 2010/1/9 Kunal > Well, the HTML doc is quite big! You would not want to dig into > that ;) > > Anyways I tried to remove most of the redundant things and the > skeleton HTML does look something like as below > > > > > > Some content here >http://dummy-url";> > > > Test test > > lkdsjlakjds > > > > > > > > > If this helps, great. If you need more information, please let me > know. > > -Kunal > > On Jan 9, 6:48 pm, Angrez Singh wrote: > > I'll look into this .. above should work .. meanwhile can you send me the > > HTML you are using? > > > > - Angrez > > > > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > > > No. They don't. See the error which I get, If I try to do something > > > like that. > > > > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, "//span > > > [...@text='Root Node']" ).focus > > > > > NoMethodError: undefined method `element_by_xpath' for # > > 0x32f24f4> > > > > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > non_control_elements.rb:20:in `locate' > > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > element.rb:49:in `assert_exists' > > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > element.rb:284:in `enabled?' > > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > element.rb:56:in `assert_enabled' > > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > element.rb:266:in `focus' > > >from (irb):25 > > > > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > > > Correct as Željko said it should work? > > > > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > > > zeljko.fili...@wa-research.ch> wrote: > > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar > > > wrote: > > > > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" > > > ).click > > > > > > would fail with error. > > > > > > > That should work. What error do you get? > > > > > > > Take a look: > > > > > > >http://wiki.openqa.org/display/WTR/XPath > > > > > > > "...you can access frames using the attributes that Watir provides > but > > > you > > > > > can't use *xpath* attribute for accessing frames..." > > > > > > > Željko > > > > > -- > > > > > watir.com - community manager > > > > > watirpodcast.com - host > > > > > > > -- > > > > > 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 > > > > > -- > > > 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 > > -- > 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 > -- 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: XPath Support in Frame
Well, the HTML doc is quite big! You would not want to dig into that ;) Anyways I tried to remove most of the redundant things and the skeleton HTML does look something like as below Some content here http://dummy-url";> Test test lkdsjlakjds If this helps, great. If you need more information, please let me know. -Kunal On Jan 9, 6:48 pm, Angrez Singh wrote: > I'll look into this .. above should work .. meanwhile can you send me the > HTML you are using? > > - Angrez > > On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > > No. They don't. See the error which I get, If I try to do something > > like that. > > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, "//span > > [...@text='Root Node']" ).focus > > > NoMethodError: undefined method `element_by_xpath' for # > 0x32f24f4> > > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > non_control_elements.rb:20:in `locate' > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:49:in `assert_exists' > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:284:in `enabled?' > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:56:in `assert_enabled' > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:266:in `focus' > > from (irb):25 > > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > > Correct as Željko said it should work? > > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > zeljko.fili...@wa-research.ch> wrote: > > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar > > wrote: > > > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" > > ).click > > > > > would fail with error. > > > > > That should work. What error do you get? > > > > > Take a look: > > > > >http://wiki.openqa.org/display/WTR/XPath > > > > > "...you can access frames using the attributes that Watir provides but > > you > > > > can't use *xpath* attribute for accessing frames..." > > > > > Željko > > > > -- > > > > watir.com - community manager > > > > watirpodcast.com - host > > > > > -- > > > > 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 > > > -- > > 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 -- 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
Re: [wtr-general] Re: XPath Support in Frame
I'll look into this .. above should work .. meanwhile can you send me the HTML you are using? - Angrez On Sat, Jan 9, 2010 at 3:18 PM, Kunal wrote: > No. They don't. See the error which I get, If I try to do something > like that. > > irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, "//span > [...@text='Root Node']" ).focus > > NoMethodError: undefined method `element_by_xpath' for # 0x32f24f4> > >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > non_control_elements.rb:20:in `locate' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > element.rb:49:in `assert_exists' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > element.rb:284:in `enabled?' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > element.rb:56:in `assert_enabled' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > element.rb:266:in `focus' >from (irb):25 > > On Jan 8, 3:45 pm, Angrez Singh wrote: > > Correct as Željko said it should work? > > > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > > > zeljko.fili...@wa-research.ch> wrote: > > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar > wrote: > > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" > ).click > > > > would fail with error. > > > > > That should work. What error do you get? > > > > > Take a look: > > > > >http://wiki.openqa.org/display/WTR/XPath > > > > > "...you can access frames using the attributes that Watir provides but > you > > > can't use *xpath* attribute for accessing frames..." > > > > > Željko > > > -- > > > watir.com - community manager > > > watirpodcast.com - host > > > > > -- > > > 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 > > -- > 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 > -- 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: XPath Support in Frame
No. They don't. See the error which I get, If I try to do something like that. irb(main):025:0> browser.frame( :id, "test-339" ).span( :xpath, "//span [...@text='Root Node']" ).focus NoMethodError: undefined method `element_by_xpath' for # from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ non_control_elements.rb:20:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:49:in `assert_exists' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:266:in `focus' from (irb):25 On Jan 8, 3:45 pm, Angrez Singh wrote: > Correct as Željko said it should work? > > On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin < > > zeljko.fili...@wa-research.ch> wrote: > > On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar wrote: > > > $ie.frame(:index, 3).span( :xpath, "//d...@id='test']/../span" ).click > > > would fail with error. > > > That should work. What error do you get? > > > Take a look: > > >http://wiki.openqa.org/display/WTR/XPath > > > "...you can access frames using the attributes that Watir provides but you > > can't use *xpath* attribute for accessing frames..." > > > Željko > > -- > > watir.com - community manager > > watirpodcast.com - host > > > -- > > 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 -- 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: xpath
On Sat, Sep 26, 2009 at 6:51 AM, Wesley Chen wrote: > How to flash or click after element_by_xpath method? Flash would not work, but the documentation said this should work: browser.element_by_xpath("//h...@id='header']").click I did not have the time to try it out. Željko --~--~-~--~~~---~--~~ 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: xpath
Is there a generic element class in Watir that we could use to wrap watir-unsupported elements when they come out of element_by_xpath? On Fri, Sep 25, 2009 at 10:51 PM, Wesley Chen wrote: > Hi, Zeljko, > So, would you please show the click method here? > How to flash or click after element_by_xpath method? > Thanks. > Wesley Chen. > The easier, the better. > > > > On Fri, Sep 25, 2009 at 10:34 PM, Željko Filipin < > zeljko.fili...@wa-research.ch> wrote: > >> On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh wrote: >> > http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx >> >> Thanks Angrez, I have found click method. >> >> >> Željko >> >> >> > > > > -- Nathan Lane Blog, http://blog.nathandelane.com --~--~-~--~~~---~--~~ 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: xpath
Hi, Zeljko, So, would you please show the click method here? How to flash or click after element_by_xpath method? Thanks. Wesley Chen. The easier, the better. On Fri, Sep 25, 2009 at 10:34 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh wrote: > > http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx > > Thanks Angrez, I have found click method. > > > Željko > > > > --~--~-~--~~~---~--~~ 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: xpath
On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh wrote: > http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx Thanks Angrez, I have found click method. Željko --~--~-~--~~~---~--~~ 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: xpath
Refer this for the properties/methods for the underlying ole_element: http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx Each element is having different set of properties/elements you can check the type of element and then see the corresponding element in the above list. - Angrez On Fri, Sep 25, 2009 at 5:18 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > On Fri, Sep 25, 2009 at 1:19 PM, Angrez Singh wrote: > > 2. element_by_xpath(xpath) is a method which is used only for the > elements which are not supported by Watir. It returns you the underlying > ole_object which doesn't contains "flash" method, hence the error. > > What can I do with ole_object? How do I click it? Or flash it? I have > searched for documentation, but I have not found anything useful so far. > > Željko > > > > > --~--~-~--~~~---~--~~ 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: xpath
On Fri, Sep 25, 2009 at 1:19 PM, Angrez Singh wrote: > 2. element_by_xpath(xpath) is a method which is used only for the elements which are not supported by Watir. It returns you the underlying ole_object which doesn't contains "flash" method, hence the error. What can I do with ole_object? How do I click it? Or flash it? I have searched for documentation, but I have not found anything useful so far. Željko --~--~-~--~~~---~--~~ 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: xpath
Hi Željko, Please try to use *exists* function. Thanks & Regards, Ankur Gera > --~--~-~--~~~---~--~~ 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: xpath
Couple of things to remember while using XPath: 1. element(:xpath, [xpath]) returns you Watir Element which contains "flash" method 2. element_by_xpath(xpath) is a method which is used only for the elements which are not supported by Watir. It returns you the underlying ole_object which doesn't contains "flash" method, hence the error. Hope I am clear enough here. Let me know if you need more explanation on this. Thanks Angrez On Fri, Sep 25, 2009 at 4:10 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > I have html like this: > > Header > > This works: > > browser.h1(:xpath, "//h...@id='header']").flash > browser.h1(:id, "header").flash > > But this returns: > > browser.element_by_xpath("//h...@id='header']").flash > > returns: > > WIN32OLERuntimeError: unknown property or method `flash' > HRESULT error code:0x80020006 > Unknown name. > from (irb):12:in `method_missing' > from (irb):12 > > Anybody knows what I did wrong? > > Željko > -- > http://watirpodcast.com/ > > > > > > > --~--~-~--~~~---~--~~ 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: XPath results
> > It seems like the IE Watir returns ole_object(s) with element(s) > _by_xpath() calls, while FireWatir returns an actual Watir Element > object. > > Is that right? > Thats correct. > > Is it possible to get the Watir element object from the ole_object? > I think you can get watir element from ole_object. Can you try this? [WatirElement] xyz = [WatirElement].new(ole_object) e.g Table xyz = Table.new(table_ole_object) Thanks, Angrez --~--~-~--~~~---~--~~ 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: xpath problems
I´m using Portuguese; I added yuor code, and it worked fine. thanks a lot. Miguel On Fri, Jun 5, 2009 at 3:24 PM, Felipe Knorr Kuhn wrote: > Are you using Google in English or another language? > > Adding this to your code might fix it > > $KCODE = "u" > WIN32OLE.codepage = WIN32OLE::CP_UTF8 > > (or CP1252) > > FK > > 2009/6/5 Miguel Argollo > > HI, >> >> I´m just trying to start using xpath, so I decided to change the Google >> example in order to have some working code; I changed the >> >> ie.button(:name, "btnG").click # "btnG" is the name of the Search button >> >> line by >> >> ie.button(:xpath,"//inp...@name='btnG']/").click >> >> but I got this error msg: >> >> Step 3: click the 'Google Search' button. >> c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:90:in `parse': >> #> ception: Missing end tag for 'label' (got "span") (REXML::ParseException) >> Line: >> Position: >> Last 80 unconsumed characters: >> 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: xpath problems
Are you using Google in English or another language? Adding this to your code might fix it $KCODE = "u" WIN32OLE.codepage = WIN32OLE::CP_UTF8 (or CP1252) FK 2009/6/5 Miguel Argollo > HI, > > I´m just trying to start using xpath, so I decided to change the Google > example in order to have some working code; I changed the > > ie.button(:name, "btnG").click # "btnG" is the name of the Search button > > line by > > ie.button(:xpath,"//inp...@name='btnG']/").click > > but I got this error msg: > > Step 3: click the 'Google Search' button. > c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:90:in `parse': > # ception: Missing end tag for 'label' (got "span") (REXML::ParseException) > Line: > Position: > Last 80 unconsumed characters: > 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: XPath and ñ
As I side note I have replaced REXML with nokogiri which will greatly improve the speed of your IE tests (at a guess 3 - 5 times faster) http://github.com/aidylewis/watir/blob/467c42a079c6f0b3e78a187353e288f8e3787503/watir/lib/watir/ie-class.rb Aidy --~--~-~--~~~---~--~~ 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: XPath and ñ
On Wed, Jun 3, 2009 at 3:36 PM, Andrew wrote: > Looks like that fixed it in my initial testing. Thanks! I am glad to hear that. :) I am just surprised that in this day and age we still have to take care of unicode and stuff like that. Željko --~--~-~--~~~---~--~~ 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: XPath and ñ
Just for the sake of having a complete question/answer, you just need to add the following two lines to your ruby script: require “win32ole” WIN32OLE.codepage = WIN32OLE::CP_UTF8 Source: http://zeljkofilipin.com/2006/03/15/utf-8-and-ruby/ On Jun 3, 9:36 am, Andrew wrote: > Looks like that fixed it in my initial testing. Thanks! > > On Jun 3, 9:29 am, Željko Filipin > wrote: > > > On Wed, Jun 3, 2009 at 3:17 PM, Andrew wrote: > > > If the ñ character is anywhere in my html file, it appears to be > > > breaking the xpath selectors I'm using. > > > A long time ago I wrote a blog post that could maybe help you: > > >http://zeljkofilipin.com/2006/03/15/utf-8-and-ruby/ > > > Željko > > --http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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: XPath and ñ
Looks like that fixed it in my initial testing. Thanks! On Jun 3, 9:29 am, Željko Filipin wrote: > On Wed, Jun 3, 2009 at 3:17 PM, Andrew wrote: > > If the ñ character is anywhere in my html file, it appears to be > > breaking the xpath selectors I'm using. > > A long time ago I wrote a blog post that could maybe help you: > > http://zeljkofilipin.com/2006/03/15/utf-8-and-ruby/ > > Željko > --http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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: XPath and ñ
Thanks, I'll check that out. On Jun 3, 9:29 am, Željko Filipin wrote: > On Wed, Jun 3, 2009 at 3:17 PM, Andrew wrote: > > If the ñ character is anywhere in my html file, it appears to be > > breaking the xpath selectors I'm using. > > A long time ago I wrote a blog post that could maybe help you: > > http://zeljkofilipin.com/2006/03/15/utf-8-and-ruby/ > > Željko > --http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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: XPath and ñ
On Wed, Jun 3, 2009 at 3:17 PM, Andrew wrote: > If the ñ character is anywhere in my html file, it appears to be > breaking the xpath selectors I'm using. A long time ago I wrote a blog post that could maybe help you: http://zeljkofilipin.com/2006/03/15/utf-8-and-ruby/ Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---