selenium python has no attrirute getText 1

selenium python has no attrirute getText

for element in self.driver.find_elements_by_tag_name('img'):
       print element.text
       print element.tag_name
       print element.parent
       print element.location
       print element.size

Here is what the above code is Doing:
1. It’s finding all the elements on the page that have the tag name ‘img’.
2. It’s printing the text of each element.
3. It’s printing the tag name of each element.
4. It’s printing the parent of each element.
5. It’s printing the location of each element.
6. It’s printing the size of each element.

Similar Posts