3

After sign-in into any application, default browser pop-up would appear on screen like Would you like Firefox to remember this login? can we handle this pop-up with selenium IDE commands?

enter image description here

3 Answers 3

2

Selenium IDE cmd -

There are limitations as to what can be replayed through Selenium IDE. It is not possible with IDE because the popup is not a html object and will not have any locator. It is an ActiveX object. I would suggest you try Selenium Webdriver.

Don't bother building tests using Selenium IDE, even though the Selenese script recorded by Selenium IDE can be converted to a webdriver script, you will loose chance of building modular tests if you do so. If application changes in future, you will have to modify all your tests independently.

@Praveen, Give a try -

    Set <String> handles =driver.getWindowHandles();
    Iterator<String> it = handles.iterator();

    String parent = it.next();
    String child = it.next();

    driver.switchTo().window(child);
    //perform actions on child window

    driver.close(); // only for child wondow


    driver.switchTo().window(parent);
    //perform actions on parent window

    driver.quit(); // After execution of main thread and for parent window
  • Work around to handle pop-up -

If you are really looking to have some way to implement, You can use "Java AWT Robot class" to handle the scenario. using this class you can perform mouse actions on basis of screen coordinates or you can use AutoIT to automate this process for handling windows popup

Update us if you have queries or issue resolved.

3
  • Narendra, By using web-driver we can handle pop-ups. But my queries is how to handle this pop-up by using IDE commands only Jul 20, 2016 at 7:03
  • I missed that part to explain. I will modify my answer to make most precise. Jul 20, 2016 at 7:36
  • Pavan - If any of the answer helps you, pls accept so question will not be in active status for too long. Jul 27, 2016 at 13:43
1

Another approach would be to disable such prompts.

If you disable the Firefox Password Manager then you shouldn't get the pop-up to remember passwords. Tools > Options > Security: Passwords: [] "Remember passwords for sites"

Since you are using IDE and not really testing anything in the prompt, this solution should work.

For webdriver, it requires 1 additional step to build a profile with this setting and pass it in.

0

That is not an actual popup. If you click/focus on any element in the page it should disappear.

Do you need to handle that browser notification? to remember the password? If not it should not be an issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.