I want to put a variable in my selector so that it will click on the element with that specific variable name instead of the same one everytime. However, when I do it, I keep getting an error and it is not clicking anywhere. Does anyone have a solution for this?
Take both the selectors and check what is differing in both of them.
Then, Make sure you are not passing the variable in the selector directly. Pass the selector as a string variable again. I mean, just assign the selector to a string, then replace the differing value as a string again in the variable and then pass this variable to the selector so that it will work.
Can you try this way and let me know if you have any issues @amb13
Well, the string works in a message box, so I am not sure how it would be empty. I do not have a default value because the value comes from when the text from my email is stored in the variable. I guess I am not understanding what you are trying to say because I cant make up a value when it is going to be different everytime
I want the aanmae= In_FileName instead of test_excel.xlsx. because it is going to store a new file in this variable each time that I run the bot as it pulls from a new email. But as soon as I try to change my selector to the variable name it does not want to validate it. But if I put the “test_excel.xlsx” as the default value it now wants to work. But I do not want this to always have this value, so that is confusing to me
However, even though it is validates when I set a default value, the click will not work.
Do you have an idea on how I can click on the text stored in the variable without doing this? I cant move forward until this is done. I wanted to use the click activity to click on the file with the name of the variable.
Did you check that you are passing correct the name of the file to the variable? … could you print the variable before the click to be sure that you are giving ok the value or try with debug to check that.