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
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
>
>
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
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
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
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
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
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
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
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/
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
--~--~-~--~
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
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
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
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 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
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
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
>
> 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
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
>
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
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
--~--~-~--~~~---~
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
--~--~-~--~~~---~--~---
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
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
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
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
27 matches
Mail list logo