Jump to content

Validating an "auto-search" combobox in IE


Recommended Posts

Hi community

Am trying to fill a combobox in a ServiceNow  session under IE that contains some weird code that I am unable to handle

<input name="IO:552fcda0dbde274096992dcb0b9619f2" tabindex="-1" title="Centre de Coût CCS" class="ng-isolate-scope select2-offscreen" id="sp_formfield_IO:552fcda0dbde274096992dcb0b9619f2" role="textbox" style="min-width: 150px; opacity: 1;" type="text" ng-disabled="snDisabled" glide-form="getGlideForm()" field="field" sn-disabled="field.isReadonly()" sn-options="{placeholder: field.placeholder}" record-values="getEncodedRecordValues()" ref-id="formModel.sys_id" ref-table="formModel.table" sn-select-width="100%" label-id="sp_reference_element_sr_IO:552fcda0dbde274096992dcb0b9619f2">

Here's the code I started to write, it somehow works, but stay "locked" after Send command

Func SpiF_E_CdC($oIE,$Cdc)
    Local $oForm = _IEFormGetObjByName($oIE,1)
    Local $oInput = _IEFormElementGetObjByName($oForm,"IO:552fcda0dbde274096992dcb0b9619f2")
    _IEAction($oInput,"focus")
    Send($Cdc)
    Send("{ENTER}") ; Seems to be with no effect
EndFunc

If I manullay type "Enter" after that Send command, it validates the text, but if I code this with a Send("{ENTER}"), it doesn't work

Have you got any idea on how to validate the typing ?

I added a screenshot where to illustrate when the blocking of the script

Note : What I type has to be found during the autosearch, but I am sure that it will be, that's why I intend a Send "txt" + Send "Enter"

Capture__.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...