How to get span text? but when one has an img in that span of error!

0

The following code gets the span , but if it has a img it has an error.

user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(names))
user.click()

My system takes title from span and clicks it. But when title is followed by text and img I do not know what to do.

    
asked by anonymous 14.09.2018 / 18:13

0 answers