a week ago
Hey everyone, I'm trying to retrieve items from a dropdown list or input the first few characters into the dropdown box to select an item. Is there any method that can help with this? The dropdown box is editable.
Wednesday
Hi @girabor ,
please try the below options and let me know if this works,
1. Spy the editable area of the dropdown as highlighted below
2. In Application modeller, set the attribute "Value" to be dynamic.
3. Use Write stage and select the element and pass the exact value to be selected
As per your query, you want to select the item based on first few characters. May i ask, is this a restriction from the data level? cant we get exact text?
Alternate approaches:
1. Use Navigate stage for the element and you will have option to select list item value(this has to be exact again) or you will have index value of the item to be select(the list item will have the index for each value, so we cna use that to select required value from the dropdown.
2. Use Navigate stage to focus on the dropdown and click on the dropdown symbol to open the list, then using sendkeys you can try passing the first few characters to select. but you need to make sure that you have the unique dropdown values so that it works fine.
Even if it has unique values, make sure to read the value selected to match the value you wanted to select.
Hope this helps.
Thanks,
Nandha
Wednesday
Thanks, Nandhakumar. I tried this, but it still isn't working. I'm trying to enter the text 'solo' into the box or select it from the dropdown, and it's the only option available in the list.
Wednesday - last edited Wednesday
Hi @girabor ,
Can you pls share the screenshot of spied element in app modeller and which spying mode your are using? Also can you provide me the options when you use the element in navigate stage?
Pls provide some before and after run screenshots of the app? as you are mentioning that it is not selecting the value in the dropdown list. is it atleast able to write the value?
Because there could be chances that dropdown value select has to be onclick event so that other values related by this dropdown are refreshed accordingly.
Thanks,
Nandha
Wednesday - last edited Wednesday
Okay thanks, This is what I spied and this is the what the dropdown entails and I am using browser mode to spy.
Thursday - last edited Thursday
Hi @girabor
As you can see your web element type is a div.
For a drop down list it should be for example a select or a list web element type.
Some application even if we are dealing with a drop down list, the developper create them as a div so we cannot use the navigate action and put "select item" or the read action stage to get the items of that list.
What i can suggest you, try to inspect your application and try to find in the DOM (html tree) near of your drop down list (maybe parent element or child element) if you have a select or list web element type and then maybe we can do something 😉
If you want and you are confortable with this, try to inspect and then take a screen shot and we will help you.
Friday
Thanks Mohamad, Let me try it.