Vignesh Dhakshinamoorthy
I am trying to auto-click a button and submit a coach, whenever a row is selected in a table control.
When I try the following, like mentioned here, it does not work.
On Row Selected by User: alert(“row selected”); ${Button1}.click();
So I go back to my usual ways, and write this, which works fine.
On Row Selected by User: alert(“row selected”); dojo.query(‘#Button1 button’)[0].click();
If I have to use $, what code should I write to submit the button having control id Button1
Thanks for your help.
jmac
${<button-ctl-id>).click() should work, if that is not working for you you will need to show more of what you are doing, so we can tell you how to fix.
JMAC
Vignesh Dhakshinamoorthy
Thank you John! looks like I was using a Button from the Coaches toolkit, and that’s why I didn’t work. As soon as I switched to a Button control from Spark Toolkit, it worked fine.
I need to remember this well! On the other day I had a similar problem where the Table control displayed the label in each row, even after selecting “Hide” option. Then I realized I was using the Output Text of BPM toolkit, and it worked fine after switching to Spark’s Output text control.