Dropdown / Combobox - Retrieve selected value

I am trying to webscrape a dynamic popup multitabbed window to get the actual value of fields. When i use the regular webscraping tools on the window it pulls over everything out of order from all three tabs. if i try one element at a time it does pull over a lot of what i need, but any combobox it pulls all the options not just what is displayed. By looking through the development pane I have been able to find where on the websites coding it is storying the actual values, but i have not been able to make “get attributes” work correctly. below is a screen shot of my findings. what i am looking for is highlighted on the far right. on chrome it is on the computed properties tab of the developer pane “value:”

the most success i have had so far is using a find children/ for each loop and putting a read OCR withing that, but it takes 20x longer than pulling directly would take and i have to do this scrape for about 20,000 times or more records.

someone has mentioned a javascript injection on another post that looked somewhat similar but i lack the vocabulary to properly search what i need to accomplish that.


May we ask you to share the URL with us?

1 Like

no problem, but the example screens are behind a login and password. But! I found an example from the open facing part of their website that seems similar.

https://cvvaccine.nmhealth.org/ >then click create new profile the first large blue blue box
then scroll down element is the “select occupation dropdown”

" id=“pre-reg-occupation” required" is the element screen shot below

i selected convenience store and it appears as a computed property under accessibility tree

edit 25 min later

i noticed when looking through the UIexplorer that the information pulls in the “property explorer” pane under the properties “selecteditem” and “selecteditems”. hmm how do i pull those?

edit 1+ hour later

okay I kept clicking and clicking and poking and figured it out.
used the get attribute activity, then i opened it in the uiexplorer option i changed the UIframework to active accessibility and it appeared as a “text” attribute. tried it on multiple elements and it seems to be work ing. it will be a lot more of work to setup, but will be a lot less time in the long run.

thanks i hope this help some one

can you please try following:


it should retrieve the selected value

1 Like

that works too! i was able to get them to pull as ‘text’ attributes when i changed the UIframework.


Yes Peter !
using the same element, but i wanted to iterate for number of times through this drop down to each attribute to extract it data.
for example,

  1. this drop down contains (Occupation) → Care Giver, CAre Taker, Doctor, Engg, Carpenter… so on.

2.so each one is having a dataTable in it,
* say - for Care Giver, it has its salary, experience & etc. in form of dataTable.
* next - for Care Taker, same as that of content of Care Giver.
* same with other
3. Need to extract this, so i have to iterate number of time over this Occupation (Drop Down) to store the Care Giver,Taker, Engg, … dataTable in Excel sheet.

Not getting what to do after these.


please stay with the discussion within your topic, so better for us to adress it individually. It helps also researchers to focus on 1 Topic = 1 case. Thanks

Got it :slight_smile: