Hello ,
I want to validate a scenario in which , I have to check the price of product listed in RecycleView .
Problem is There is Multiple Linear Layout with same id .
I tried follwoing code , I am able to get Text of Product , nut not able to get price of that product .
WebElement product_name=driver.findElement(By.xpath("//android.widget.TextView[@resource-id='com.snapdeal.main:id/productTitle' and @text='Healthvit Selenium 200mcg 60 Capsules']"));
System.out.println(product_name.findElement(By.id("com.snapdeal.main:id/productDisplayPrice")).getAttribute("text"));
I do I get it working. A working code is much more helpful.
Thanks