Error: NO browser is open

Hello guys,

I´m learning how to use Robot framework and while trying to execute my project it shows a message error.

I´ve done a project to open the browser in a page, login in this page, open an specific menu, then insert information in 2 fields and click in “search”

It will show the correct information, but I wanted to be sure so I inserted this:

Check if the information is correct

SeleniumLibrary.Element Text Should Be    xpath=//td[contains(text(), "O BOTICARIO")]    O BOTICARIO   

But is gives back the message error:

“No browser is open”.


I´m using the “New page” Keyword from Browser library.

and in my settings I have both librarys:

Library Browser
Library SeleniumLibrary

Thank you very much
:blush:

Hi Nathalia,

If you opened the browser with Browser Library keywords then you won’t be able to use SeleniumLibrary keyword on that browser session as SeleniumLibrary can only interact with browsers that SeleniumLibrary opened and vice versa Browser Library can only interact with browsers that Browser Library opened.

You will need to chose one or the other and use that for all the steps in your test case.

FYI the Browser Library equivalent is probably using an assertion with Get Text

${text} =    Get Text    xpath=//td[contains(text(), "O BOTICARIO")]    ==    BOTICARIO

Dave.

1 Like

Thank you very much Dave,

It helped me a lot, now it’s not showing the error anymore.
Only shows that it has more 2 elements equal, but I´m going to check it.

:blush: :smile: