micthaworm
micthaworm

Reputation: 23

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.

Upvotes: 0

Views: 2195

Answers (2)

3eternus
3eternus

Reputation: 33

dont use Selenium2Library, use SeleniumLibrary latest version.

Upvotes: 0

asprtrmp
asprtrmp

Reputation: 1062

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"]

Upvotes: 1

Related Questions