I am having a problem on handling google authentication pop up window in robot framework.

The process I want to automate is -

  1. When a button( Sign in with google) is clicked , google authentication pop up window appears
  2. Then I have to enter my username and password
  3. Then click sign up button

While running the robot framework test script , everything working fine upto clicking the 'Sign in button', but after that am not able to view the Google-authentication window in browser !

I found some similar questions around here , but those solutions didn't work for me.

Here is my test script -

*** Settings ***
Library  Selenium2Library
Test Setup  Open Browser  http://xyz.com  firefox
Test Teardown  Close All Browsers

*** Test Cases ***
   Open xyz and verify login

*** Keywords ***
Open xyz and verify login
  Maximize Browser Window
  Click Element  id=my-signin2 #To click 'Sign in with google' link in main page
  Select WIndow  title=Sign in - Google Accounts #To select the new pop up window
  Input Text  id=username  username
  Input Text  id=pswd   pswd
  Click Button  id=signup

Now, While running the test case getting an error like this - "Keywords select window fails"

Value Error : Unable to locate window with title 'Sign in - Google accounts " !

I have also tried with URL instead of title, that also didn't work!

I have searched a lot for this issue in google, but didn't get any proper solution for this particular issue.

I hope you guys can help me to solve this issue.

  • Well, it says what is the problem - there's no window with that title. Are you sure the string is correct? Is that really another window - but not a div or similar element/overlay in the current one? Can you give a real url so we can check? And most importantly - why am I commenting on questions 1.5 years old? :D jk on the last part, would be happy to help if you give some more details. Commented Mar 16, 2017 at 7:22
  • 1
    Have you tried: Select Window locator=NEW Have you tried to get the window handles on the Google window with keywords like: Get Window Names or Get Window Handles or Get Window Sizes?
    – jskwrite
    Commented Nov 26, 2018 at 18:39

1 Answer 1


Well, use handle to switch it. Get Window Handles keyword for getting how many the browser you open. Because the Google Sign in is my second browser, then I type handles 1

Register with Google
Click Button    google-signin-btn-0
${handles}=  Get Window Handles
Switch Window   ${handles}[1]
Sleep    3s

Your Answer

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

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