How to select item from drop down list.

14,851 views
Skip to first unread message

Pavan T

unread,
Feb 3, 2015, 2:45:44 AM2/3/15
to robotframe...@googlegroups.com
Hi Team RF,

I wanted to do script which get all the options from the list and store it in list variable and after that select the appropriate option in the drop down. Here I give you my little script code ,

@{role}=    Select From List    id=slt-customer
log    @{role}   
Select From List By Index    id=slt-customer    @{role}[1]

Please let me know any other information is needed.

Thanks,

Pavan

Ed Manlove

unread,
Feb 3, 2015, 8:18:40 AM2/3/15
to robotframe...@googlegroups.com
Paven,

There is the 'Get List Items' keyword which should be helpful to you. I
will note that the documentation states "Returns the values in the
select list " when it really should read "Return the labels" and not
"values". Then you could use the 'Select From List By Label' keyword.

Ed

Pavan T

unread,
Feb 3, 2015, 8:32:44 AM2/3/15
to robotframe...@googlegroups.com
My sample script,
@{BillMethod}=     Select From List  id=slt-billing-method
Select From List By Value  id=slt-billing-method  @{BillMethod}[1]

I got following error ,

INFO : Typing text 'CUST1' into text field 'id=txt-cust-org-code'
INFO : Selecting all options from list 'id=slt-billing-method'.
INFO : @{BillMethod} = [ ]
FAIL : Non-existing variable '@{BillMethod}[1]' 

Ed Manlove

unread,
Feb 3, 2015, 8:47:09 AM2/3/15
to robotframe...@googlegroups.com
Pavan,

The 'Select From List' when not passing which items to select will select all items or as the user will click on each each item in the list to select. It does not return a value thus your error.


@{BillMethod}=     Select From List  id=slt-billing-method

Try using 'Get List Items' with 'Select From List By Label' instead.

@{BillMethod}=     Get List Items  id=slt-billing-method
Select From List By Label  id=slt-billing-method  @{BillMethod}[1]

Ed
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Pavan T

unread,
Feb 3, 2015, 9:07:14 AM2/3/15
to robotframe...@googlegroups.com
Thanks, It worked for me.


On Tuesday, 3 February 2015 18:48:40 UTC+5:30, Ed Manlove wrote:

nall...@gmail.com

unread,
Nov 24, 2016, 7:49:10 AM11/24/16
to robotframework-users
Hi Pavan, 

I used the above script in my system, The list values are selected from the element but the list values are not saved in the variable. So I couldn't able to select the picklist value. Can you please provide me the solution to select the picklist values.

Here is my code:

${List}    Select From List    Id=lea5
    Log    ${List}
   Select From List By Value    Id=lea5    ${List}[5]


Thanks,
Nallavan G

 

Tatu Aalto

unread,
Nov 24, 2016, 12:20:16 PM11/24/16
to nall...@gmail.com, robotframework-users

Ugh

The Select From List doesn't return anything and therefore Select From List By Value fails. Perhaps if you would explain what problem you are trying to solve and perhaps then we can guide you in the right direction.

-Tatu
Send from my mobile


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.

nall...@gmail.com

unread,
Nov 29, 2016, 7:45:28 AM11/29/16
to robotframework-users, nall...@gmail.com
Yes Tatu, What I am looking here I want to select my picklist value in salesforce. Could you please provide me the exact solution., I have tried lot but I couldn,t get the answer

Thanks
-Nallavan G
To post to this group, send email to robotframe...@googlegroups.com.

Tatu Aalto

unread,
Nov 29, 2016, 1:53:22 PM11/29/16
to nall...@gmail.com, robotframework-users

Ugh

I can't provide you the solution, because:
1) I don't even understand what you want
2) I don't have access to the application
3) I, usually, don't provide solutions, but I try help to think what would the best solution.

-Tatu
Send from my mobile

To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

nall...@gmail.com

unread,
Dec 3, 2016, 12:51:28 AM12/3/16
to robotframework-users, nall...@gmail.com

Hi Tatu,

Thanks! for the update, I tried lot finally I got a solution, now I can able to handle the picklist values.

I am working on the salesforce test automation preparing robot framework script, In this Salesforce application, have some major functionalities like dynamic web table, frame handle, and so on, I started the script before the month ago so I am not familiar this framework.Some place i am lacking to do the script.

could you please provide me the solution  for how to handle the dynamic web table? 

In Java we can handle using for loop and we can create a variable for both row and column then store the values then we can automate it.

In Robot framework I tried a lot but Could not handle this, you have any idea about that? Can you provide me the solution?

Thanks
Nallavan G
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

Tatu Aalto

unread,
Dec 3, 2016, 5:02:33 AM12/3/16
to nall...@gmail.com, robotframework-users
Ugh

Example in here https://github.com/robotframework/Selenium2Library/issues/625 is a discussion how to handle dynamic websites.


-Tatu
Send from my mobile
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

s20091981

unread,
Feb 2, 2017, 2:42:35 AM2/2/17
to robotframework-users

Nallavan G

unread,
Apr 5, 2017, 6:10:29 AM4/5/17
to Tatu Aalto, robotframe...@googlegroups.com
Hi All,

I am having one blocker in my automation tasks, please resolve it

Platform: Salesforce CRM - Salesforce classic 

Issues:  I am not able to choose the lookup values by clicking lookup icon.

Expected Result: When user click link text element from lookup window the lookup window is automatically closed and the values are fetched to the particular field, then it should be move to parent window then proceed further action in parent window 


Description: There is two window when we click lookup icon from parent window, here I could able to switch the window from parent to child and then the child window having two frames, then Identify and choose the clickable element but here the issues is element is clicking as UI level but it does not click as programmatically and the RIDE is continuously running infinite there is no exception throwing. So I am not able to identify whether the test execution is failed or not? There is no response from RIDE.

Is there is any possible way to proceed?

I have attached my code for your reference please take look and let me know your comments to resolve this blocker

Thanks
Nallavan G


Lookup.txt
Lookup.robot

Christian Rudolf Tan

unread,
Oct 15, 2018, 2:42:06 AM10/15/18
to robotframework-users
Hi, can you please share your solution?
Reply all
Reply to author
Forward
0 new messages