-1

I am getting the element not found error to type input in the search element

Code used by me :

 browser.find_element_by_css_selector("input[id='pubicationQuery'][name='publicationQuery']").click()

browser is my webDriver selenium object. I have tried class name, also X path but unable to locate the element.

Error:

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: input[id='pubicationQuery'][name='publicationQuery']
Kara
  • 6,115
  • 16
  • 50
  • 57
  • Welcome to Stack Overflow. Please take [the tour](http://stackoverflow.com/tour) here. Also, please read [this guide](https://stackoverflow.com/help/how-to-ask) on how to ask a good question. In future, please post the actual code in text and [not in a picture](http://idownvotedbecau.se/imageofcode). It is more helpful if your code is given this way because if we need to run it we can copy and paste. – Micheal O'Dwyer Feb 09 '18 at 17:21
  • 1
    Possible duplicate of [Selenium "selenium.common.exceptions.NoSuchElementException" when using Chrome](https://stackoverflow.com/questions/47993443/selenium-selenium-common-exceptions-nosuchelementexception-when-using-chrome) – undetected Selenium Feb 09 '18 at 17:32
  • Still same error selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: input[id='publicationQuery'][name='publicationQuery'] – Ankur Arora Feb 09 '18 at 21:10

1 Answers1

3

From what I can understand from the error and the image you added, it just a typo

in the code below id should be publicationQuery and not pubicationQuery.

EDIT - forgot to fix the typo

browser.find_element_by_css_selector("input[id='publicationQuery'][name='publicationQuery']").click()
Matt. Stroh
  • 904
  • 7
  • 16