In the application which I work, there are some dropdowns where in some pages there’ll be multiple options in the dropdown and in some pages only single option (by default it is selected & dropdown is disabled). Please help me how to handle this scenario if it is enabled I should click it and select multiple options and if disabled I should skip clicking it.
There is an activity called select item . U can use that and as input you can pass the item to be selected.
Select item activity will give an error if the drop down is disabled, so if u put it in a try catch and do nothing in the catch block . Try block if the drop down is active it will go on selecting the required item