Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Im running Website GUI unittests using NUnit2.6.2 with VS 2010 Pro on Win7 x64, JRE7 32bit

This issue works when using Firefox, Chrome and IE, which are all suported by Selenium in C# WebDriver Class. To use Opera in tests, i need to use the selenium standalone java server in v.2.33 because OperaDriver Class is not available in C# (only Java), which is possible according to http://sauceio.com/index.php/2012/03/selenium-tips-uploading-files-in-remote-webdriver/ ). The website is hosted on a locally running VM.

preparation in Console:

//note: set OPERA_PATH environment variable (in cmd or global)
C:\Progra~2\Java\jre7\bin\java.exe -jar selenium-server-standalone-2.33.0.jar

C# - get opera file upload running:

_wait.waitUntil(ExpectedConditions.ElementIsVisible(By.TagName("input")));
        IWebElement element = driver.FindElement(By.TagName("input"));


DesiredCapabilities opera = DesiredCapabilities.Opera();
opera.SetCapability("opera.profile",    @"C:\OperaProfile");
webDriver = new RemoteWebDriver(opera);

....

_wait.waitUntil(ExpectedConditions.ElementIsVisible(By.TagName("input")));
IWebElement element = webDriver.FindElement(By.TagName("input"));
element.SendKeys(configFile); //configfile is string to file path
webDriver.FindElement(By.Id("submitButton")).Click();

the same scenario works when using

webDriver = new FirefoxDriver(profile);

or

webDriver = new InternetExplorerDriver(ie);

Clicking, submitting text and finding elements does work for Opera with this remoteWebdriver Construction, only the fileDialog refuses to run.

What am i missing? Does anyone see a solution or a workaround? I have the impression, this is not possible after some research with this construct in C#.

Thx in advance!


edit: browser versions are all up to date, 32 bit (e.g. opera 12.15 32bit)

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.