nittolese / gquestions

Find "People Also Ask" questions
GNU General Public License v3.0
59 stars 36 forks source link

Unable to locate element. A small change in Google results page. #6

Open ownchoice opened 5 years ago

ownchoice commented 5 years ago

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class='kno-ftr']//div/following-sibling::a[text()='Enviar comentarios']"}

Trying to use it to fetch Spanish results gives me this error. But I see the link with the anchor text "Comentarios" instead of "Enviar comentarios", so if I change the line 103 in the file gquestions.py it works fine. From: el = browser.find_element_by_xpath("//div[@class='kno-ftr']//div/following-sibling::a[text()='Enviar comentarios']") To: el = browser.find_element_by_xpath("//div[@class='kno-ftr']//div/following-sibling::a[text()='Comentarios']")