Problem Description:
I am trying to automate the filling of the form in which there's a locality dropdown list. I am facing problem in selecting the option which are suggest in the suggestion list. The options in the suggestions list are provided by an api response i.e its dynamic. I am not able to select one of the option from the suggested list.
String Locality ="//label[contains(text(),'Locality')]/following-sibling::input";
public void insertData(DataTable str) throws InterruptedException {
List<List<String>> list = str.asLists(String.class);
super.identifyElement(locators.xpath, Locality), list.get(1).get(5));// value sendkey= Akurdi;
HTML Element:
<label _ngcontent-c4="" for="Location" class="active">Locality</label>
<input _ngcontent-c4="" autocapitalize="off" autocorrect="off" class="mb-0 ng-valid ng-dirty ng-touched" formcontrolname="locality" placeholder="" spellcheck="off" stype="locality" type="text" ng-reflect-klass="mb-0" ng-reflect-ng-class="[object Object]" ng-reflect-name="locality" ng-reflect-model="Akurdi" autocomplete="off">
Sendkey value form cucumber screnario: Akurdi... Display Input dropdown list UI