I want to select multiple values from the dropdown using webdriver. The values will be fetched from excel file. Two issues faced while trying to automate this
- Since two different dropdowns are next to each other, there is a problem with overlay. Once I click on the first dropdown and select a value, and then try to click on the next dropdowns to select a value from it, below error gets thrown. How to avoid this?
- How to import multiple values that are to be selected from the dropdowns?
org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <mat-select _ngcontent-lkq-c113="" role="listbox" formcontrolname="Location" multiple="" class="mat-select ng-tns-c62-9 ng-tns-c47-8 ng-untouched ng-pristine ng-valid ng-star-inserted" id="mat-select-1" tabindex="0" aria-required="false" aria-disabled="false" aria-invalid="false" aria-multiselectable="true">...</mat-select> is not clickable at point (689, 189). Other element would receive the click: <div class="cdk-overlay-backdrop cdk-overlay-transparent-backdrop cdk-overlay-backdrop-showing"></div>(Session info: chrome=85.0.4183.121)
Goal is to select these dropdowns and click on search button. I could select these forcefully using Javascript "jse.executeScript("arguments[0].click()", element);" and get the results but need an alternative solution. Please suggest.