cancel
Showing results for 
Search instead for 
Did you mean: 

Oriented Button Click

SaraBranham
Level 2
Hello! I'm having a lot of trouble clicking on a button (image attached)
36330.pngThe area identified extends beyond the actual button I want to press, so when I send a "click" it doesn't actually click where I need it to. I've come across comments about using a global click where you can add coordinates, but I don't seem to have this action. I've also tried using send keys to send "{TAB} {ENTER}" but my send keys never works (maybe I'm using it improperly?) I've tried it on both the root element and a child element. I've also tried send key events to no avail and I've been looking into using an invoke code, but that just seems like a really complicated solution to what should not be a complicated problem.

Please help! I'm not sure what I'm doing wrong and am very stuck.
2 REPLIES 2

Hi Sara

From the look of the image is this an internet explorer upload dialog box you are having a problem with? If so it could be that the window you want to press the button in hasnt been activated and the action is being sent to the main explorer window. Have you tried adding an activate before the press action? if this doesnt help you might try re-spying the element again using a different spy mode so only the button is within the spy area. Alternatively for the send key events you should press tab a few times to make sure the tab is selecting the button you are looking for, you can try doing this manually to count how many tab actions are required to highlight that button. I find the press action for buttons on IE often dont work and usually spying different spy type works especially if you use a Global click action on the button instead of a press.

Hope this helps.

NicholasZejdlik
Level 9
That looks like an HTML file input; are you spying it in HTML mode or in another mode? I've had to spy out a lot of those in HTML, and despite the highlight showing the whole thing and not just the Choose File button, a click usually works in that mode. If all else fails, try spying it in accessibility mode, and as Michael mentioned, activate the window before clicking it.