Skip to content

Add ability to type into a prompt #292

@boakley

Description

@boakley

Right now it is not possible to type into a javascript prompt -- the only options are to confirm or cancel an alert.

I would like support for a keyword like "Insert into prompt" that would type into a prompt.

I did a quick prototype on my mac, and it seemed pretty easy to implement:

    def insert_into_prompt(self, text):
        alert = None
        try:
            alert = self._current_browser().switch_to_alert()
            alert.send_keys(text)

        except WebDriverException:
            raise RuntimeError('There were no alerts')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions