ChromeGetElementData does not get data from combobox

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
druiz_fe
Newbie
Posts: 1
Joined: Wed May 20, 2020 7:42 pm

ChromeGetElementData does not get data from combobox

Post by druiz_fe » Wed May 20, 2020 8:12 pm

We have a comboBox that is set to ReadOnly = true. We tried a sub and Chrome element read data with no results. Could the combobox ReadOnly= true prevent us from getting and setting the value we need?
In the web form there are other comboBoxes that we are able to get and set the value we want.
These are the two methods we tried. Any suggestions would be appreciated.

Using Chrome Driver Elements:
ChromeFindElements>session_id,id,ctl00_DialogContent_AddPatientEGExam_rcbCLSphereRight_Input,elements
ChromeGetElementData>session_id,elements_1,text,comboText1
// comboText1 is blank in the watch list

Using Sub:
GoSub>dropDownSelect,175,745,-1.75

SRT>dropDownSelect
/*****
Usage: GoSub>dropDownSelect,X,Y,text_to_select (found here https://www.mjtnet.com/blog/?s=drop+down)

Where X and Y are coordinates in the edit box (where the item appears once selected)
and text_to_select is the text you want selected

Important: the drop down needs to have the focus
*****/
If>dropDownSelect_Var_3<>
GetTextReset
//Press Home
Wait>1.0
Let>prev_comboText=Z@$%#XXX
Let>dropDownFound=FALSE
Label>select_drop
GetTextAtPoint>dropDownSelect_Var_1,dropDownSelect_Var_2,comboText,c
Pos>dropDownSelect_Var_3,comboText,1,p

If>p<>1
If>prev_comboText<>comboText
Press Down
Wait>0.2
Let>prev_comboText=comboText
Goto>select_drop
Endif
Else
Let>dropDownFound=TRUE
Endif
Endif
END>dropDownSelect

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts