Xpath and CSS selectors

Showing 1-6 of 6 messages
Xpath and CSS selectors webtester 11/29/10 2:14 PM
hi,

what is the difference between xpath and CSS selectors?
In which case should I use xpath as I normally use CSS?

which one is better?


Thanks,
Roy
Re: Xpath and CSS selectors Brian Kitchener 11/29/10 7:12 PM
From what I understand CSS is faster, so use it if you can.  However,
xpath tends to allow more precision finding an element on the page.

On Nov 29, 3:14 pm, "roydekle...@orange.nl"
Re: [selenium-users] Re: Xpath and CSS selectors Zhong 11/29/10 7:15 PM
Compare the performance, CSS is better. Specially when you apply the test code in IE.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Re: Xpath and CSS selectors webtester 11/30/10 1:35 AM
ok, thanks for you reply..

In which situations do I have to use XPath? when is it usefull ?

Maybe someone can give me some example on that?


Much appreciated,
Roy de Kleijn



On 30 nov, 04:15, Yuping Zhong <littlezhong...@gmail.com> wrote:
> Compare the performance, CSS is better. Specially when you apply the test
> code in IE.
>
> On Tue, Nov 30, 2010 at 11:12 AM, Brian Kitchener <kitchener.br...@gmail.com
>
> > wrote:
> > From what I understand CSS is faster, so use it if you can.  However,
> > xpath tends to allow more precision finding an element on the page.
>
> > On Nov 29, 3:14 pm, "roydekle...@orange.nl"
> > <rdekleijnaspi...@gmail.com> wrote:
> > > hi,
>
> > > what is the difference between xpath and CSS selectors?
> > > In which case should I use xpath as I normally use CSS?
>
> > > which one is better?
>
> > > Thanks,
> > > Roy
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsubscribe@googlegroups.com>
> > .
Re: Xpath and CSS selectors Narendra Lahoti 12/1/10 4:37 AM
CSS selector allow only single direction(Parent to child element)
traverse ,but xpath does allow bidirectional traverse.

so based on need xpath might be the only option

-Narendra

On Nov 30, 2:35 pm, "roydekle...@orange.nl"
Re: [selenium-users] Re: Xpath and CSS selectors Niraj 12/1/10 6:01 AM
Go through this post . This might help you identify the scenario for CSS and xpath

http://automationtricks.blogspot.com/search/label/CSS%20and%20Selenium


To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.




--
Thanks & Regard,
Niraj Kumar