I currently want to automate the creation of an opportunity in Salesforce and in doing so I want to read the individual items from the drop down menus and then write them into an input dialog as choices. The first problem I find is that it is a lightning combo box/pick list and therefore I am not able to read the items properly (useful).
My approaches so far are FindChildren and GetAttribute and iterate through “innertext” or “outertext” of the results.
But I have problems with the selectors on the web interface. Even with the UI Explorer I don’t get a helpful result.
Either I take the field itself
and there is no information about the drop down items or I take the area around the drop down menu.
Then I have the options, but they are a single long string in the inner and outer text and this string cannot be broken down into the individual logical components according to any pattern.
These are the options
NP Transformers; SO All Products; SO FACTS; SO Grid Access; SO HVDC; SO SIEAERO; SO Substations; SP AIS; SP All Products; SP GIS;
Here is the string out of the innertext:
*Product TypeHelp–None–NP TransformersSO All ProductsSO FACTSSO Grid AccessSO HVDCSO SIEAEROSO SubstationsSP AISSP All ProductsSP GISComplete this field.
Theoretically, I could hardcode all options with a switch and then select the selected item with click options depending on the previously made selection in an input dialogue. But the drop-down menus change depending on the previously selected values in drop-down menus. Entering all this manually would be an immense time-consuming task. And I want the automation to work independently of changes to the items in the drop downs.
I would be grateful for any help.