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.
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"]
I also noticed that if i used the
Run Keywords
and chain that key word with another one the keyword failed. That is what maybe was causing the issue so i decided to split the keywords and execute them separately instead on chaining them based on a certain condition.In
Run Keywords
case, you'll have to useAND
between keywords. E.g.:Run Keywords Keyword1 argument AND Keyword2 argument2 argument3