I need to find elements on a page by looking for text(), so I use xlsx as a database with all the texts that will be searched.
It turns out that it is showing the error reported in the title of the publication, this is my code:
search_num = str("'//a[contains(text()," + '"' + row[1] + '")' + "]'")
print(search_num)
xPathnum = self.chrome.find_element(By.XPATH, search_num)
print(xPathnum.get_attribute("id"))
print(search_num) returns = '//a[contains(text(),"0027341-66.2323.0124")]'
Does anyone know where I'm going wrong, despite having similar posts on the forum, none of them solved my problem. Grateful for the attention