Hi size() returns integer and you are comparing with string
You can use the size() method of java. util. ArrayList to find the
length or size of ArrayList in Java. The size() method returns an
integer equal to a number of elements present in the array list.
So the ...
Finally, this solution works for me --
Instrument the Istanbul.js.
Use Command -
istanbul instrument test.js >> test-instumented.js
Now, use the below code in @AfterClass annotation. It will execute the below method after all tests.
4. Now, we have coverage.json.
Crete a HTML using coverage,json using istanbul report.
When querying Android apps with Xpath there is no id attribute. There is a resource-id attribute instead. Appium is doing work behind the scenes to still provide By.id as a locator despite this.
If you don't use contains here, you'll need to put in the full resource-id, which is very long.
When you use xpath that is to locate nested elements you have to start your query from .. Like String query = ".//*[contains(@resource-id, 'delivered_indicator')]";