Injects a credential into the authenticator. Example: ``` from selenium.webdriver.common.credential import Credential credential = Credential(id="user@example.com", password="aPassword") driver.add_credential(credential) ```
(self, credential: Credential)
| 1750 | |
| 1751 | @_required_virtual_authenticator |
| 1752 | def add_credential(self, credential: Credential) -> None: |
| 1753 | """Injects a credential into the authenticator. |
| 1754 | |
| 1755 | Example: |
| 1756 | ``` |
| 1757 | from selenium.webdriver.common.credential import Credential |
| 1758 | |
| 1759 | credential = Credential(id="user@example.com", password="aPassword") |
| 1760 | driver.add_credential(credential) |
| 1761 | ``` |
| 1762 | """ |
| 1763 | self.execute( |
| 1764 | Command.ADD_CREDENTIAL, |
| 1765 | {**credential.to_dict(), "authenticatorId": self._authenticator_id}, |
| 1766 | ) |
| 1767 | |
| 1768 | @_required_virtual_authenticator |
| 1769 | def get_credentials(self) -> list[Credential]: |