Skip to content

Add ability to type into a prompt #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
boakley opened this issue May 12, 2014 · 14 comments
Closed

Add ability to type into a prompt #292

boakley opened this issue May 12, 2014 · 14 comments

Comments

@boakley
Copy link
Contributor

boakley commented May 12, 2014

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')
@emanlove
Copy link
Member

Sounds like a good suggestion.

@pekkaklarck
Copy link
Member

Should probably be named like "Input Text Into Prompt" to be consistent with "Input Text".

@Kristina001
Copy link

Hey guys..
Will it helps me for my probleM?

My problem is the following:
I have an upload form, and when I do upload file and click a button - my web-application automatically send me a new file for downloading. I can't handle this firefox downloading window :(

Im fighting with this for like a several days ...

@ombre42
Copy link
Contributor

ombre42 commented May 16, 2014

@Kristina001 I do not think this will help for your situation unfortunately. This is for the JS method Window prompt.

@zephraph zephraph added this to the Future Release milestone Apr 30, 2015
HelioGuilherme66 pushed a commit to HelioGuilherme66/robotframework-seleniumlibrary that referenced this issue Jul 23, 2015
add keyword input_text_into_prompt ( example from boakley )
fixes issue robotframework#292 "Add ability to type into a prompt"
HelioGuilherme66 added a commit to HelioGuilherme66/robotframework-seleniumlibrary that referenced this issue Jul 23, 2015
Add test for keyword Input Text Into Prompt

Added new keyword Input Text Into Prompt

Added new keyword Input Text Into Prompt (example from boakley). Fixes robotframework#292
HelioGuilherme66 pushed a commit to HelioGuilherme66/robotframework-seleniumlibrary that referenced this issue Sep 18, 2015
add keyword input_text_into_prompt ( example from boakley )
fixes issue robotframework#292 "Add ability to type into a prompt"
HelioGuilherme66 pushed a commit to HelioGuilherme66/robotframework-seleniumlibrary that referenced this issue Sep 18, 2015
Added new keyword Input Text Into Prompt (example from boakley). Fixes robotframework#292
@SerhiiAksiutin
Copy link

SerhiiAksiutin commented Jun 18, 2017

When I do something like
Go to https://username:password@mytestwebsite.com
Input Text Into Prompt ${url_username}

(Or you can just open Privet window) I get this. Does it look like an alert? If so then "Input Text Into Prompt" keyword doesn't work for Safari Technology Preview Release 33 (Safari 11.0, WebKit 12604.1.25.0.2)

screen shot 2017-06-18 at 10 40 08 am

@aaltat
Copy link
Contributor

aaltat commented Jun 19, 2017

Please open a new issue or send mail to the Robot Framework user group.

@ShAnsari
Copy link

Is this issue solved?

@aaltat
Copy link
Contributor

aaltat commented Jun 21, 2017

See #827

@antho03
Copy link

antho03 commented Nov 15, 2017

It's ok for type in first username textfield but how can i input on password field ?

@aaltat
Copy link
Contributor

aaltat commented Nov 15, 2017

Please ask the question in the Robot Framework user group or open a new issue. First one is preferred.

@Ballalokesh
Copy link

Hi above issue got solved?? please let me know i also facing similar kind of problem.

@satymaju
Copy link

satymaju commented May 6, 2020

Hi,
How to input text into alert when there are two fields ?
Anyone figured out how to input text in the alert second input field(for example: password field) ?

Thanks,
Satya

@satymaju
Copy link

satymaju commented May 6, 2020

When I do something like
Go to https://username:password@mytestwebsite.com
Input Text Into Prompt ${url_username}

(Or you can just open Privet window) I get this. Does it look like an alert? If so then "Input Text Into Prompt" keyword doesn't work for Safari Technology Preview Release 33 (Safari 11.0, WebKit 12604.1.25.0.2)

screen shot 2017-06-18 at 10 40 08 am

Yes , I am getting the same problem it is not an alert.
Have you been able to find how to input text there, without the url technique(https://username:password@mytestwebsite.com`) ?

@aaltat
Copy link
Contributor

aaltat commented May 7, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests