• +43 660 1453541
  • contact@germaniumhq.com

Germanium Robot Bindings


Germanium Robot Bindings

Germanium has now Robot bindings. That means you can spin it up in your robot test-cases with zero effort. As a bonus, it can also work with your existing Selenium test cases. Let’s see how this works:

First, we need to install it:

pip install robotframework-germaniumlibrary

Then, in our test-case, instantiate the browser, and start testing away:

*** Settings ***
Library  GermaniumLibrary

*** Test Cases ***
This is a simple test case
    Open Browser  chrome
    Maximize Window
    Go To  https://germaniumhq.com
    Click  Link("Log In")
    Assert Exists  Input().right_of(Text("Email"))
    Type Keys In  Input().right_of(Text("Email"))  someuser
    Close Browser

The full list of keywords is this one:

If you already have some existing Selenium test cases, and you want to try out Germanium, you can reuse the browser opened by Selenium:

*** Settings ***
Library  SeleniumLibrary
Library  GermaniumLibrary

*** Test Cases ***
This is a test case to show usage with the SeleniumLibrary
    SeleniumLibrary.Open Browser  https://germaniumhq.com  chrome
    GermaniumLibrary.Use Selenium Browser
    GermaniumLibrary.Maximize Window
    GermaniumLibrary.Click  Link("Log In")
    GermaniumLibrary.Type Keys In  Input().right_of(Text("Email"))  someuser
    GermaniumLibrary.Assert Exists  Input()
    GermaniumLibrary.Assert Missing  Text("eeee")
    SeleniumLibrary.Close Browser

That’s it! Enjoy your testing :D