I am trying to get the values from dropdown i have tried (Find Children and get attribute in ForEach).
But not able to getting the values. and also need to fill a form using those data.
Example:
I have an website which i need to get the items from dropdown and also i need to fill the form by using those items one after other. after clicking the submit button.
Inside the dropdown i have 9 items available but i need only 6 items from the dropdown AND i need to loop them to fill the particular field using those items
The company contains 9 items. i need to pick one item and then fill the all those fields and finally click on Generate Report. after that it should pick another item from drop down anf do the same procedure.
Use get attribute for the dropdown and get the innertext. Inner text will contain all the values of dropdwon. Once your get the value make an array by splitting it and exclude which you don’t want and loop it for further process.
This can be done with find children and get attribute itself
And for this
You can stop the bot searching those 3 unwanted drop down values using a IF condition before typing or clicking that text in drop down
Say for example you know those three unwanted value means
Then use a If condition like this
{“value1”,”value2”,”value3”}.Contains(“your get attribute value”)
If true then it goes to THEN part where leave it empty and if false it goes to FALSE where include the activity that chooses the value from drop down