[wtr-general] Re: Xpath cell

2010-01-28 Thread jw
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

Re: [wtr-general] Re: XPath Support in Frame

2010-01-14 Thread Angrez Singh
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 > >

[wtr-general] Re: XPath Support in Frame

2010-01-14 Thread Kunal
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, 20

Re: [wtr-general] Re: XPath Support in Frame

2010-01-14 Thread Wesley Chen
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

[wtr-general] Re: XPath Support in Frame

2010-01-14 Thread Kunal
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

Re: [wtr-general] Re: XPath Support in Frame

2010-01-10 Thread Wesley Chen
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

Re: [wtr-general] Re: XPath Support in Frame

2010-01-10 Thread Angrez Singh
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 somethi

[wtr-general] Re: XPath Support in Frame

2010-01-09 Thread 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 tes

Re: [wtr-general] Re: XPath Support in Frame

2010-01-09 Thread Angrez Singh
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( :xpa

[wtr-general] Re: XPath Support in Frame

2010-01-09 Thread Kunal
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/

[wtr-general] Re: xpath

2009-09-28 Thread Željko Filipin
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 --~--~-~--~

[wtr-general] Re: xpath

2009-09-26 Thread Nathan Lane
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_xp

[wtr-general] Re: xpath

2009-09-25 Thread Wesley Chen
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

[wtr-general] Re: xpath

2009-09-25 Thread Željko Filipin
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 Group

[wtr-general] Re: xpath

2009-09-25 Thread Angrez Singh
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

[wtr-general] Re: xpath

2009-09-25 Thread Željko Filipin
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 d

[wtr-general] Re: xpath

2009-09-25 Thread Ankur Gera
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

[wtr-general] Re: xpath

2009-09-25 Thread Angrez Singh
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 con

[wtr-general] Re: XPath results

2009-08-21 Thread Angrez Singh
> > 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 o

[wtr-general] Re: xpath problems

2009-06-05 Thread Miguel Argollo
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 >

[wtr-general] Re: xpath problems

2009-06-05 Thread Felipe Knorr Kuhn
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 so

[wtr-general] Re: XPath and ñ

2009-06-03 Thread aidy lewis
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 --~--~-~--~~~---~

[wtr-general] Re: XPath and ñ

2009-06-03 Thread Željko Filipin
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 --~--~-~--~~~---~--~---

[wtr-general] Re: XPath and ñ

2009-06-03 Thread Andrew
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 fixe

[wtr-general] Re: XPath and ñ

2009-06-03 Thread Andrew
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 p

[wtr-general] Re: XPath and ñ

2009-06-03 Thread Andrew
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 yo

[wtr-general] Re: XPath and ñ

2009-06-03 Thread Željko Filipin
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://watirpod