UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Filling A Text Box/input Box In Ie, Any Versions    
 
   
JimCarney6
post Dec 5 2018, 05:07 PM
Post#1


UtterAccess VIP
Posts: 1,943
Joined: 9-September 02
From: Florida


i've been still having trouble with this. i think this is the element i want to "fill in"
'<input tabindex="0" class="ng-pristine ng-valid ng-scope ng-touched" aria-invalid="false" type="text" ng-model="policySearchRequestView.policyNumber.value" ng-keypress="($event.which === 13)?searchPolicies():0">

but i cannot figure out for the life of me how to reference it. how can i "grab" it so i can set a value into it? any ideas would be greatly appreciated.

thank you!
Go to the top of the page
 
June7
post Dec 5 2018, 09:57 PM
Post#2



Posts: 126
Joined: 25-January 16



I don't see ID or Name property so the control can be directly addressed. Might have to do some sort of looping through all controls until you hit the one you want. How many controls of this type are on the page?
This post has been edited by June7: Dec 5 2018, 09:58 PM

--------------------
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
Go to the top of the page
 
JimCarney6
post Dec 5 2018, 10:25 PM
Post#3


UtterAccess VIP
Posts: 1,943
Joined: 9-September 02
From: Florida


I'm open to looping thru. That's how i get it to this screen & only had to go thru 3 before it hit a match & exits the loop. I would say there's probably 15 controls i see and probably a few things like the about page, contact us at the top or bottom i dont really pay attention to so my guess is 30-40 max. Speed is not my primary concern so if I can find the field that's more important. There's a lot I'm not familar with in HTML. I see that this seems to be an Inline Control, i see span tags and aria. Just not sure how that affects my ability to grab the element & let me assign a value to it. The following is most of the HTML, i made the area i think is what i want yellow. Edit:cant change the collor so i put ***************************************** around the area I think is my control.

<
CODE
ng-form class="form ng-pristine ng-valid" name="policySearchForm">
   <div class="gw-control-group-wrapper">
      <div class="form-item select-form-fli form-item-grid-fli ng-isolate-scope" model="policySearchRequestView.policyNumber" label="Policy Number" gw-pl-ctrl-group="">
         <div class="gw-control-group" aria-hidden="false" ng-class="{ 'gw-error': showError(), 'gw-inline-control-group': inline, 'gw-control-group': !inline, 'gw-control-group-focused' : focused, 'required-fli': model.aspects.required }" ng-show="isVisible()">
            <!-- ngIf: label -->
            <label title="" class="ng-scope gw-control-label" ng-class="{'gw-control-inline-label': inline, 'gw-control-label': !inline}" ng-if="label">
               <span class="ng-binding">
                  Policy Number
                  <!-- Information icon for Useful Hints -->
                  <!-- ngIf: usefulHint -->
               </span>
               <span class="gw-required-asterisk ng-hide" aria-hidden="true" ng-show="(model.aspects.required &amp;&amp; !readonly) || (showAsterisk &amp;&amp; !readonly &amp;&amp; label === 'Date Of Birth')">*</span>
            </label>
            <!-- end ngIf: label -->
            <div class="gw-controls" ng-class="{'gw-inline-controls': inline, 'gw-controls': !inline}">
****************************************
               <ng-transclude>
                  <input tabindex="0" class="ng-pristine ng-valid ng-scope ng-touched" aria-invalid="false" type="text" ng-model="policySearchRequestView.policyNumber.value" ng-keypress="($event.which === 13)?searchPolicies():0">
               </ng-transclude>
*****************************************
               <div class="gw-inline-messages" aria-hidden="false" ng-show="!readonly">
                  <!-- ngRepeat: errorMessage in model.aspects.validationMessages track by $index -->
               </div>
            </div>
         </div>
      </div>
      <!-- ngIf: policySearchRequestView.IsPersonalPolicy === 'true' -->
      <div class="form-item-grid-fli ng-scope ng-isolate-scope" ng-if="policySearchRequestView.IsPersonalPolicy === 'true'" model="policySearchRequestView.firstName" label="First Name" gw-pl-ctrl-group="">
         <div class="gw-control-group" aria-hidden="false" ng-class="{ 'gw-error': showError(), 'gw-inline-control-group': inline, 'gw-control-group': !inline, 'gw-control-group-focused' : focused, 'required-fli': model.aspects.required }" ng-show="isVisible()">
            <!-- ngIf: label -->
            <label title="" class="ng-scope gw-control-label" ng-class="{'gw-control-inline-label': inline, 'gw-control-label': !inline}" ng-if="label">
               <span class="ng-binding">
                  First Name
                  <!-- Information icon for Useful Hints -->
                  <!-- ngIf: usefulHint -->
               </span>
               <span class="gw-required-asterisk ng-hide" aria-hidden="true" ng-show="(model.aspects.required &amp;&amp; !readonly) || (showAsterisk &amp;&amp; !readonly &amp;&amp; label === 'Date Of Birth')">*</span>
            </label>
            <!-- end ngIf: label -->
            <div class="gw-controls" ng-class="{'gw-inline-controls': inline, 'gw-controls': !inline}">
               <ng-transclude>
                  <input tabindex="0" class="ng-pristine ng-valid ng-scope ng-touched" aria-invalid="false" type="text" ng-model="policySearchRequestView.firstName.value" ng-keypress="($event.which === 13)?searchPolicies():0">
                  <!--<div class="exact-match-fli">-->
                  <!--<div class="gw-control-label">-->
                  <!--{{'agent.views.policy-landing.Exact Match' | translate}}-->
                  <!--<input type="checkbox"-->
                  <!--ng-model="policySearchRequest.isFirstNameExact"-->
                  <!--class="gw-check"-->
                  <!--id="firstNamePolicyCheckboxLabel{{$index}}">-->
                  <!--<label class="gw-checkbox" id="firstNamePolicyCheckboxLabel" for="firstNamePolicyCheckboxLabel{{$index}}"></label>-->
                  <!--</div>-->
                  <!--</div>-->
               </ng-transclude>
               <div class="gw-inline-messages" aria-hidden="false" ng-show="!readonly">
                  <!-- ngRepeat: errorMessage in model.aspects.validationMessages track by $index -->
               </div>
            </div>
         </div>
      </div>
      <!-- end ngIf: policySearchRequestView.IsPersonalPolicy === 'true' -->
      <!-- ngIf: policySearchRequestView.IsPersonalPolicy == 'true' -->
      <div class="form-item-grid-fli full-width-input-fli ng-scope ng-isolate-scope" ng-if="policySearchRequestView.IsPersonalPolicy == 'true'" model="policySearchRequestView.lastName" label="Last Name" gw-pl-ctrl-group="">
         <div class="gw-control-group" aria-hidden="false" ng-class="{ 'gw-error': showError(), 'gw-inline-control-group': inline, 'gw-control-group': !inline, 'gw-control-group-focused' : focused, 'required-fli': model.aspects.required }" ng-show="isVisible()">
            <!-- ngIf: label -->
            <label title="" class="ng-scope gw-control-label" ng-class="{'gw-control-inline-label': inline, 'gw-control-label': !inline}" ng-if="label">
               <span class="ng-binding">
                  Last Name
                  <!-- Information icon for Useful Hints -->
                  <!-- ngIf: usefulHint -->
               </span>
               <span class="gw-required-asterisk ng-hide" aria-hidden="true" ng-show="(model.aspects.required &amp;&amp; !readonly) || (showAsterisk &amp;&amp; !readonly &amp;&amp; label === 'Date Of Birth')">*</span>
            </label>
            <!-- end ngIf: label -->
            <div class="gw-controls" ng-class="{'gw-inline-controls': inline, 'gw-controls': !inline}">
               <ng-transclude>
                  <input tabindex="0" class="ng-pristine ng-valid ng-scope ng-touched" aria-invalid="false" type="text" ng-model="policySearchRequestView.lastName.value" ng-keypress="($event.which === 13)?searchPolicies():0">
                  <!--<div class="exact-match-fli">-->
                  <!--<div class="gw-control-label">-->
                  <!--{{'agent.views.policy-landing.Exact Match' | translate}}-->
                  <!--<input type="checkbox"-->
                  <!--ng-model="policySearchRequest.isLastNameExact"-->
                  <!--class="gw-check"-->
                  <!--id="lastNamePolicyCheckboxLabel{{$index}}">-->
                  <!--<label class="gw-checkbox" id="lastNamePolicyCheckboxLabel" for="lastNamePolicyCheckboxLabel{{$index}}"></label>-->
                  <!--</div>-->
                  <!--</div>-->
               </ng-transclude>
               <div class="gw-inline-messages" aria-hidden="false" ng-show="!readonly">
                  <!-- ngRepeat: errorMessage in model.aspects.validationMessages track by $index -->
               </div>
            </div>
         </div>
      </div>
      <!-- end ngIf: policySearchRequestView.IsPersonalPolicy == 'true' -->
      <!-- ngIf: policySearchRequestView.IsPersonalPolicy === 'false' -->
   </div>
</ng-form>
Go to the top of the page
 
June7
post Dec 5 2018, 10:36 PM
Post#4



Posts: 126
Joined: 25-January 16



If you already know how to do the loop and how to identify the control, exactly what is the issue?
This post has been edited by June7: Dec 5 2018, 10:52 PM

--------------------
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
Go to the top of the page
 
JimCarney6
post Dec 6 2018, 07:52 PM
Post#5


UtterAccess VIP
Posts: 1,943
Joined: 9-September 02
From: Florida


The issue has been referencing the control. Nothing i've tried allowed me access to the control.
Go to the top of the page
 
June7
post Dec 6 2018, 11:49 PM
Post#6



Posts: 126
Joined: 25-January 16



Does looping through controls actually set focus on each on the web page? If so, is there really a need to explicitly reference it? If control has focus, is it possible to just send data and it will go into the active control? If this is not possible, and I am not finding it is, then I don't see any solution to your situation.


--------------------
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
Go to the top of the page
 
JimCarney6
post Dec 7 2018, 04:33 PM
Post#7


UtterAccess VIP
Posts: 1,943
Joined: 9-September 02
From: Florida


This one proved troublesome. The loops i was able to call just never seemed to touch the control in question. Someone suggested querySelector as the solution & indeed it was. IE.Document.querySelector("input[ng-model='policySearchRequestView.policyNumber.value']") wound up being something that i could use to grab the control then use .value = "something" to put text into the box. I appreciate your input on the question. This website was the hardest one I've gone through, most are not so bad at having id's on their text boxes, but when i hit some control types I seem to hit a wall.
-Jim
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    12th December 2018 - 12:04 AM