How to locate multiple class other than css selector?

How to locate multiple class other than css selector?

for reference :
<a class=”btn btn-primary” ng-class=”{ ‘btn-editmode’ : basket.isEditBasket }” ng-click=”updateBasket( $event, product, 1, ‘ProductDetail’ )” title=”buy”>buy</a>

user1705 Default Asked on March 18, 2015 in Selenium WebDriver.
Add Comment
3 Answer(s)

By.ClassName(“.btn.btn-primary”);

Virender Singh Professor Answered on March 18, 2015.
Add Comment

It’s not working

user1705 Default Answered on March 18, 2015.
Add Comment

If By.ClassName contains spaces then it won’t work.

Use By.xpath(“//a[@class=’btn btn-primary’]”)

ravichand Default Answered on March 18, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.