lundi 6 juin 2016

Android Appium Python - element.get_attribute('text') returns no text

I try to get the text attribute of an element in hybrid app.

def test_example(driver):
   el = driver.find_element_by_id('com.access_company.twine.android.dmc:id/btnVideos')

   print el.get_attribute("text")

so there is a button with video icon and a text "Videos". Unfortunately the above code doesnt print anything. So i tried this:

 print el.get_attribute("resourceId")

Surprisingly that works. So what am I missing or doing wrong here? Hope someone can help.

UIAutomator

Regards

Aucun commentaire:

Enregistrer un commentaire