select window cant be recognised

247 views Asked by At

{code}

Close Popup Window
    ${title_var}        Get Window Titles
    Log To Console      ${title_var}
    Select Window       title=@{title_var}[1]
    Comment             Go back to the first window
    close window

{code}

{Logs}

TestCase1:UserNameValidation                                        
| FAIL |
No keyword with name 'Select Window' found.

{Logs}

The select window cant be recognised, installed is Selenium2library 3.0.0

1

There are 1 answers

0
Roby Selvaraj On

NOTE: Selenium2Library has been renamed to SeleniumLibrary since version 3.0. Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases with transitioning to the new project.

Try Switch Window keyword instead of select window

Close Popup Window
    ${title_var}        Get Window Titles
    Log To Console      ${title_var}
    Switch Window       title=@{title_var}[1]
    Comment             Go back to the first window
    close window