cancel
Showing results for 
Search instead for 
Did you mean: 

'File' object type with Browse button - Not able to click on Browse button

Highlighted
Contributor

'File' object type with Browse button - Not able to click on Browse button

Hi.

i am creating a automation script with testcomplete to automate the file upload functionality in our application. But i could find a text box with a Browse button next to it. When i tried to fetch the Browse button object i could notice it gets identified as a 'File' object which includes the text box. it does not show up any child objects. But i have to click on the Browse button, which i am not able to find it. Can anyone please help on this. Solutions on this as soon as possible will be appriciated.





-Thanks

Sowmya BS
3 REPLIES 3
Highlighted

RE: 'File' object type with Browse button - Not able to click on Browse button


Hi Sowmya,





Try using the code below to click the button:



  Set wUpload = ' ... obtain the control

  Call wUpload.Click(wUpload.Width - wUpload.Height / 2, wUpload.Height /2)

--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Contributor

RE: 'File' object type with Browse button - Not able to click on Browse button

Hey Thanks, It worked.

But i had an alternative solution with the code lines.


Set BrowseBtnObject = ... Get the object..

BrowseBtnObject.Click     'This will set the cursor on the text box

BrowseBtnObject.Keys("[Tab] ")   'This will press the space bar after the focus is changed to Browse button



But i am curious to know why i was not able to get the browse button object uniquely!! Any answers for these would help in further scripting knowledge.



-Thanks

Sowmya BS

Highlighted

RE: 'File' object type with Browse button - Not able to click on Browse button

Hi Sowmya,


TestComplete cannot recognize the button as an individual object because the control doesn't have special support for this control.


BTW, I have registered a suggestion to implement special support for the control. Thanks.


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors