I’m trying to automate a process wherein the robot opens Notepad, and depending upon what value I put as default for the UiPath variable MenuOption (currently the value is “View”), the robot either opens up the File, Edit, or View menu options.
The Dynamic Selector won’t validate and I think my syntax is correct. I have no explanation of why it’s not validating.
When I actually run the bot, it always clicks on File regardless of what value I have in MenuOption (it always clicks on File because that’s the menu option I indicated for the Click activity, but the functionality I want is to click on any of the 3 menu options based on the value of the MenuOption variable).
I’m modifying the Strict Selector - not the fuzzy selector or window selector.
Hello ashokkarale! I have already assigned a default value to MenuOption. (See my screenshot). I made the default value “View”. The problem is when I click on Validate, it does not validate, and so the selector is not dynamic.
Thank you for the tip on making it more dynamic as well.
Edit: Not sure why the screenshot didn’t show up initially but I reuploaded it so you can see.
it now validates and works. But now another problem has arisen. When I try to do a second activity (in this case, a hover activity) to move the mouse from View to Edit, the mouse still goes to File. I made sure the Hover activity has the same dynamic selector that has {{MenuOption}} in both places. Why is this happening?