Problem to display the File upload Dialog after click <input type='file'> in Selenium c# internet Explorer Visual studio 2017

55 views
Skip to first unread message

Omar Martinez

unread,
Dec 4, 2017, 4:49:29 PM12/4/17
to Selenium Developers
Problem to display properly the File upload Dialog after click a web element <input type='file'> in Selenium c# internet Explorer using Visual studio 2017.  but  when I used Visual studio 2015 with the same code and same selenium libraries in Visual studio 2015 everything is working fine. 

 Selenium libraries installed using the NuGet to try to resolve the problem are displayed below:

Option 1

* Selenium.Support 3.6.0  
* Selenium.InternetExplorerDriver 3.6.0 (32-bit and 64-bit) I used both version and I am getting the same result.
* IEDriverServer 3.6.0

Option 2

* Selenium.Support 3.7.0  
* Selenium.InternetExplorerDriver 3.7.0 (32-bit and 64-bit) I used both version and I am getting the same result.
* IEDriverServer 3.6.0

Option 3

* Selenium.Support 3.8.0  
* Selenium.InternetExplorerDriver 3.8.0 (32-bit and 64-bit) I used both version and I am getting the same result.
* IEDriverServer 3.6.0]


Any suggestion to solve this issue in the visual studio 2017.


David Burns

unread,
Dec 5, 2017, 4:28:14 AM12/5/17
to selenium-...@googlegroups.com
The IDE should make no difference since the work to do the calculation is done in internetexplorerdriver and the browser. Please raise a bug with a full set of steps to reproduce.

David


--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/4fe04b9b-e4a9-432a-9e6d-d4d25d1304ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Omar Martinez

unread,
Dec 6, 2017, 2:46:15 PM12/6/17
to Selenium Developers


Steps to reproduce the issue IE driver 32-bit 3.6.0 version

1. Create Selenium IE driver instance

var options = new InternetExplorerOptions
                {
                    EnsureCleanSession = true,
                    IgnoreZoomLevel = true,
                    IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                    EnableNativeEvents = true,
                    RequireWindowFocus = true
                }

driver = new InternetExplorerDriver(options);

2.- this.Driver.Navigate().goToURL("url");

3.- Click file html input (adding all clicks I tried)

public static void SendClick(IWebElement element)
        {
            Logger.Info("Starting click action");
            Actions action = new Actions(element.ToDriver());
            action.MoveToElement(element).Click().Build().Perform();
        }

public static void JavaScriptClick(IWebElement element)
        {
            Logger.Info("Starting Javascrit click action");
            var javascript = element.ToDriver() as IJavaScriptExecutor;
            if (javascript == null)
            {
                throw new ArgumentException("Javascript null reference");
            }

            javascript.ExecuteScript("arguments[0].click();", element);
        }

also selenium normal click element.click();

html code:

<input id="fileload" name="fileload" accept=".asc, .txt, .csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file">
Reply all
Reply to author
Forward
0 new messages