Is it possible to find element using below:
WebElement channels = driver.findElement(By.id(“com.mobitv.client.connect.mobile:id/channel_list”));
WebElement channel = channels.findElement(By.xpath("//android.widget.LinearLayout[1]"));
Thanks
Is it possible to find element using below:
WebElement channels = driver.findElement(By.id(“com.mobitv.client.connect.mobile:id/channel_list”));
WebElement channel = channels.findElement(By.xpath("//android.widget.LinearLayout[1]"));
Thanks
Laxmi,
You can use
WebElement channel = driver.findElement(new ByChained(By.id(“com.mobitv.client.connect.mobile:id/channel_list”), By.xpath("//android.widget.LinearLayout[1]")));
So, it tries to find one element by the id, and from that node, it tries to find the element using the xpath. You can also use others locators like className, or name.
I hope this could help you.