robotframeworkselenium2library

Keyword 'Selenium2Library.Click Element' expected 1 to 3 arguments, got 0


I'm trying to select the first item from the list below using robotframework:

<select id="organization_saml_enabled" name="organization[saml_enabled]">
   <option value="true">SAML SSO enabled</option>
   <option value="false" selected="selected">SAML SSO disabled</option>
</select>

With this snippet:

Click Element  //select[@id="organization_saml_enabled"]/option[@value="true"]

I get the error Keyword 'Selenium2Library.Click Element' expected 1 to 3 arguments, got 0.

I dont get it because from the way i understand the documentation the Click Element needs the locator and optional offsets. Can anyone help me check what I'm missing here.


Solution

  • Add locator strategy (xpath:) before the actual locator and remember to have at least two spaces between keyword and argument:

    Click Element    xpath://select[@id="organization_saml_enabled"]/option[@value="true"]