'I am unable to click on a text field using id in selenium python

Here is the image of text field I want to click

This is the inspect field :

<input _ngcontent-oqh-c45="" formcontrolname="target" matinput="" placeholder="https://" class="mat-input-element mat-form-field-autofill-control ng-tns-c40-0 ng-untouched ng-pristine cdk-text-field-autofill-monitored ng-invalid" id="mat-input-0" data-placeholder="https://" aria-invalid="false" aria-required="false"> 

This is the code snippet I am using :

enter_url = driver.find_element(By.ID, 'mat-input-0')
enter_url.click()

This is the error I am getting :

Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="mat-input-0"]"}
  (Session info: chrome=98.0.4758.102)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source