I want to access elements of all balises that find like this : <div class='xxxx' the text >
I did as this with Xpath:
textSearch = 'the text'
hometeam = driver.find_elements(By.XPATH,"//div[@class='xxxx'] and //div[contains(text(),'"+ textSearch +"')]")
But this not works and casting this exception : TypeError: Failed to execute 'evaluate' on 'Document': The result is not a node set, and therefore cannot be converted to the desired type.
How do ?
//div[@class='xxxx' and contains(text(), 'justin')]