normalize-space function in xpath predicates not supported?

168 views
Skip to first unread message

Jeffrey Blaze

unread,
Sep 9, 2013, 3:06:00 PM9/9/13
to appium-...@googlegroups.com
It appears that normalize-space is not supported:

findElement(org.openqa.selenium.By.xpath("//linear[1]/window[1]/imagebutton[normalize-space(@title)='Hello there']"))

throws a AssertionError exception.  While contains(string, subString) works, I use normalize-space very, very often.  Any plans to implement it?


bootstrap online

unread,
Sep 9, 2013, 3:13:45 PM9/9/13
to Jeffrey Blaze, appium-...@googlegroups.com
It's not currently supported.
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups
> "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.

Jeffrey Blaze

unread,
Sep 9, 2013, 3:43:55 PM9/9/13
to bootstrap online, appium-...@googlegroups.com
Yes, but what about the question at the end of my post?

bootstrap online

unread,
Sep 9, 2013, 3:51:23 PM9/9/13
to Jeffrey Blaze, appium-...@googlegroups.com
That's a question for @jlipps.

On Mon, Sep 9, 2013 at 3:43 PM, Jeffrey Blaze

Jonathan Lipps

unread,
Sep 9, 2013, 4:01:11 PM9/9/13
to bootstrap online, Jeffrey Blaze, appium-...@googlegroups.com
We'll be switching our XPath engine at some point in the near future to correspond with all the upcoming mobile json wire protocol changes. We'll have an XML version of the source which we can use a full-blown XPath engine to query. At that point I imagine normalize-space will work. So ETA the next few months.

Given that our homegrown XPath support is going away, I'm disinclined to add new features to it in the meantime.

bootstrap online

unread,
Sep 9, 2013, 4:17:33 PM9/9/13
to Jonathan Lipps, Jeffrey Blaze, appium-...@googlegroups.com
On Mon, Sep 9, 2013 at 4:01 PM, Jonathan Lipps <jli...@gmail.com> wrote:
>
> Given that our homegrown XPath support is going away, I'm disinclined to add new features to it in the meantime.

I agree.

Jeffrey Blaze

unread,
Sep 9, 2013, 4:45:41 PM9/9/13
to Jonathan Lipps, bootstrap online, appium-...@googlegroups.com
That makes sense.  Thanks Jonathan.

Reply all
Reply to author
Forward
0 new messages