Im struggling to find an input field in html, I can fill out every input field with the following code:
public async Task FillElementAsync(By by, string arg)
{
WebDriverWait wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(20));
IWebElement myDynamicElement = wait.Until<IWebElement>((d) =>
{
return d.FindElement(by);
});
myDynamicElement.SendKeys(arg);
}
But when I try to fill out this input, I cant focus the element:
<span class="center-block">
<sprd-label-input model="">
<div class="label-input-wrapper" ng-class="{'active': focused || !!inputValue.length || !!modelValue.length || placeholderExists, 'filled': inputValue.length || modelValue.length}" ng-transclude="">
<div ng-model="idea.getCurrentTranslation().tags" sprd-validate-tags="idea" blacklist-result="tagsBlacklist" name="tags" class="ng-pristine ng-untouched ng-valid ng-not-empty ng-valid-tags ng-valid-blacklist"></div>
<label for="design-detail-tags" class="text-medium-grey">Stichwörter</label>
<!---->
<sprd-tag-input ng-model="idea.getCurrentTranslation().tags" idea-name="idea.getCurrentTranslation().name" display-tags-left="true" display-related-tags="true" display-error-text="form.$error.tags" blacklist-result="tagsBlacklist" id="input-design-tags" name="designTags" class="ng-pristine ng-untouched ng-valid ng-not-empty">
<div class="clearfix">
<!---->
<div class="tag-input-container form-control clearfix" focus-input-on-click="" remove-on-backspace="ngModel">
<!---->
<input ng-model="TagInputCtrl.tagInput" uib-typeahead="tagSuggestion for tagSuggestion in TagInputCtrl.getTagSuggestions($viewValue)" class="pull-left ng-pristine ng-untouched ng-valid ng-empty" select-on-comma="" select-on-whitespace="" select-on-blur="" typeahead-focus-first="false" tag-select="TagInputCtrl.onEnter" tag-select-model="ngModel" sprd-max-input-length="50" ng-show="ngModel.length < TagInputCtrl.validatorOptions.tags.max" aria-autocomplete="list" aria-expanded="false" aria-owns="typeahead-2871-1170" type="text">
<ul class="dropdown-menu ng-hide" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+'px', left: position().left+'px'}" role="listbox" aria-hidden="true" uib-typeahead-popup="" id="typeahead-2871-1170" matches="matches" active="activeIdx" select="select(activeIdx, evt)" move-in-progress="moveInProgress" query="query" position="position" assign-is-open="assignIsOpen(isOpen)" debounce="debounceUpdate" style="">
<!---->
</ul>
</div>
<!---->
<p ng-if="displayTagsLeft" class="pull-right">
<small class="design-tags-left">noch 25 Stichwörter</small>
</p>
<!---->
<!---->
<div ng-if="displayRelatedTags" class="form-group clearfix tag-input-related-tags ng-hide" ng-show="TagInputCtrl.relatedTags.length > 0">
<p class="label-description pull-left" style="margin-top: 3px;">Vorschläge für Stichwörter:</p>
<ul class="list-inline related-tags-list pull-left">
<!---->
</ul>
</div>
<!---->
</div>
</sprd-tag-input>
</div>
</sprd-label-input>
</span>
I tried to find the element by ClassName ("tag-input-container"), by ID ("input-design-tags") and by name ("designTags"). So my qustion is why, whats so special on this input type besides the autocomplete function?
async? I suppose not, because you don'tawaitanything.