def get_canonical_feed_labelvisual(self):
itemList = self.select_many('LabelVisual', text = 'Canonical')
for item in itemList:
if item.text == "Canonical": return item
to this:
def get_canonical_feed_labelvisual(self):
itemList = self.app.select_many('LabelVisual', text = 'Canonical')
index = -1
for item in itemList:
index += 1
if item.text == "Canonical": return itemList[index]
See the difference? You can use item directly as it's equal to itemList[index].
This is equivalent
def get_canonical_ feed_labelvisua l(self) : many('LabelVisu al', text = 'Canonical')
return item
itemList = self.select_
for item in itemList:
if item.text == "Canonical":
to this:
def get_canonical_ feed_labelvisua l(self) : select_ many('LabelVisu al', text = 'Canonical')
return itemList[index]
itemList = self.app.
index = -1
for item in itemList:
index += 1
if item.text == "Canonical":
See the difference? You can use item directly as it's equal to itemList[index].