RE: How to validate?
I was trying to select few products and adding them to cart/Bag and I want to verify the selected Products are same in the cart/Bag. Please let me know how to do it.
URL is: http://store.demoqa.com/products-page/product-category/
Note: What all items you are selecting those items should be in your shopping cart.
I Would Suggest You to Write a Method With Webelement in Parameter
And inside Method Find Element in Try Block and in case Method Runs Successfully Element is Present Else Catch Null Pointer Exception
and Write a Message Element not Present
i Hope it Will Work