I have a HTML page generated by VUE. The page element is as below:
<input name="" id="newTvAdvertiserSelected" type="text" autocomplete="nope" placeholder="" tabindex="0" class="multiselect__input" style="width: 0px; position: absolute; padding: 0px;">
I then have the Selenium code as below to click it.
driver.find_element_by_id("newTvAdvertiserSelected").click()
If I manually click it, it works. I can also manually type in the box. However, it doesn't accept Selenium click also doesn't accept "send_keys". I got this error "Message: element not interactable".
The script also waited 5 seconds for the page and I can see all the elements on the page. So I think the script has waited long enough to load all elements.
Does VUE input and class="multiselect__input" need some special handling?
This VUE component is a combination of "input" and "select". When I type in something, it can automatically populate the dropdown list. And then I have to "Select" from the dropdown list.
The section's HTML is as below:
<!---->
<div class="el-form-item__content">
<div tabindex="-1" class="multiselect" style="">
<div class="multiselect__select"></div>
<div class="multiselect__tags">
<div class="multiselect__tags-wrap" style="display: none;"></div>
<!---->
<div class="multiselect__spinner" style="display: none;"></div>
<input name="" id="newTvAdvertiserSelected" type="text" autocomplete="nope" placeholder="" tabindex="0" class="multiselect__input" style="width: 0px; position: absolute; padding: 0px;">
<span class="multiselect__single">Just typed in COmpany Name X</span> <!----></div>
<div tabindex="-1" class="multiselect__content-wrapper" style="max-height: 300px; display: none;">
<ul class="multiselect__content" style="display: inline-block;"> <!---->
<li class="multiselect__element">
<span data-select="" data-selected="" data-deselect="" class="multiselect__option multiselect__option--highlight"><span>Company name A</span></span> <!----></li>
<li class="multiselect__element"><span data-select="" data-selected="" data-deselect="" class="multiselect__option"><span>Company name B</span></span> <!----></li>
<li class="multiselect__element"><span data-select="" data-selected="" data-deselect="" class="multiselect__option"><span>Company name C</span></span> <!----></li>
<li style="display: none;"><span class="multiselect__option">
<span>No Data</span>
</span>
</li>
<li style="display: none;"><span class="multiselect__option">List is empty.</span></li>
</ul>
</div>
</div>
<!---->
</div>
</div>```