What's the Difference between CSS3Selector and CSS3Xpath in Web Application configuration

automation-studio

#1

While field configuration in web application of automation studio, under

Field properties -> Find by-> CSS3Selector/ CSS3Xpath / Manual.

By default it would take as CSS3Selector but after the configuration, while test run, it would fail to run and throw an error message as element could not be found or some relative message, but when we change the attribute from CSS3Selector to CSS3Xpath then it found to be working fine.
So why CSS3Selector is failing in this case? what’s the difference between them?

For Example:
Rediff is working with both CSS3Selector, CSS3Xpath, but Google works only with CSS3Xpath.

Can someone help me on this?


#2

Hi @ambarish.s
Kindly refer this post -> How exactly css3xpath works?


#3

Thanks @Mantri.
If we configure all thecomponents in field configuration with CSS3Xpath in all web application, it works fine, then why it has not been selected as a default option?
And
If we analyse the execution time for CSS3Xpath and CSS3Selector, CSS3Xpath consumes a bit more time. but provides accurate results. Which one could be the better one?
If not both is there anything else there could be replaced for these two?


#5

Hi,

You can refer this post for your query
http://www.way2automation.com/selenium-webdriver-xpath-vs-css.php