As a newcomer to Protractor, I am looking to automate the selection of a dropdown. While I have some knowledge in JavaScript, I am currently working with typescript. Can someone advise me on how to select the dropdown option based on the text provided?
For example:
<ul class="ui-dropdown-items ui-dropdown-list ui-widget-content ui-widget ui-corner-all ui-helper-reset ng-tns-c46-10 ng-star-inserted" style="">
<!---->
<!----><!---->
<!---->
<!----><li class="ng-tns-c46-10 ui-dropdown-item ui-corner-all ng-star-inserted">
<!----><span class="ng-tns-c46-10 ng-star-inserted">Value 1</span>
<!---->
</li><li class="ng-tns-c46-10 ui-dropdown-item ui-corner-all ng-star-inserted">
<!----><span class="ng-tns-c46-10 ng-star-inserted">Value 2</span>
<!---->
</li><li class="ng-tns-c46-10 ui-dropdown-item ui-corner-all ng-star-inserted">
<!----><span class="ng-tns-c46-10 ng-star-inserted">Value 3</span>
<!---->
</li>
<!---->
<!---->
</ul>
My main query is regarding how I can choose the dropdown value by matching it with the visible text.