Page 1 of 1

Browse button not identified inside Input type=file

Posted: Tue Feb 24, 2015 2:30 pm
by odklizec
Hi,

I just noticed a problem with identifying "Browse" button, which is a part of HTML Input element (Input type=file).
BrowseBtn.png
Here is a sample HTML code (try it for example here: http://www.webtutorialplus.com/html-code-tester.aspx)

Code: Select all

<table class="Border"><tr><td class="BorderHeader">Select file</td><td class="Border"><input size="32" value="file" name="shipFile" type="file" class="Button"/></td></tr></table>
This "Browse" button is correctly identified/highlighted in MS Inspect tool. Fortunately, there is a workaround using click/double click inside the Input, which opens the file browser ;)

Reproducible both in 5.2.2 and most recent 5.3.

Re: Browse button not identified inside Input type=file

Posted: Wed Feb 25, 2015 4:17 pm
by krstcs
Ranorex version?

Re: Browse button not identified inside Input type=file

Posted: Wed Feb 25, 2015 4:27 pm
by odklizec
It's Ranorex version independent issue ;) I added the comment to my original post.

Re: Browse button not identified inside Input type=file

Posted: Wed Feb 25, 2015 5:09 pm
by krstcs
If you only checked 5.2.2 and 5.3 then you can't be certain it is version independent. If could have been created with all of the changes in 5.0/5.1/5.2 and just not been found yet. :D

Good catch though! 8)

Just trying to keep you on your toes!

Re: Browse button not identified inside Input type=file

Posted: Thu Feb 26, 2015 6:52 pm
by Support Team
Hi Pavel,

Thank you for the code snippet. I see what you mean.
The HTML input tag defines a button which can be clicked in order to open a file dialog. There seem to be two different controls, but it is just one button element. It is also not possible to type text into the shown "text box".
It doesn't matter where you click, the file dialog will be opened.
As workaround you could use the image based approach in order to find the "Browse ..." section just for this action.

Regards,
Bernhard