Browser needed for login test?

Hello all,

I’m relatively new to Robot Framework, anyway here’s my question :

I would like to use Robot Framework to test the login of my Nextcloud server, so
whether it’s working or not.

So far I just found examples which uses a desktop browser.

Is it also possible to run this test from the console or do I need an operating system with GUI ?

Thanks and regards,
Raphael

Hi Raphael,

To test the website with a library that uses a browser (SeleniumLibrary and Browser) you will need a GUI as the browsers won’t actually launch without one.

It doesn’t have to be a physical display however, the docker images that run these libraries use Xvfb (a virtual X display driver in linux) so that might be an option for you.

Another option, if you don’t need to do any complex navigation through the site, RequestsLibrary might be an option for you, as it doesn’t require a GUI at all, it’s the python equivalent of using curl.

If you start down the RequestsLibrary and find the site (Nextcloud) too difficult to script, then har2rf-req might help, it’s quite alpha-ish at the moment and not well documented, so i’m not recommending it yet.
The concept of har2rf-req is you save the navigation through the browser as har file(s), then call har2rf-req passing it the har file(s) and it with generate a requests library robot file with the dynamic stuff (XCRF tokens, hidden form fields, etc) taken care of as variables.

Hope that helps,

Dave.

1 Like

Yes - that helps a lot !

Thank you !
Raphael