Hi all,
I know my question is not Specflow specific but I hope that one of us was on my situation and found a solution to it.
Here is my case:
I have a test case in which I have to upload a file to a website thanks to a native upload popup ( in attachment).
We are using the SendKeys.SendWait available in the System.Windows.Forms library to do that.
Locally, there is no problem, it is working nicelly.
But when the same test is executed on the TeamCity's agent... nothing happens! :(
The file is not upload at all! :(
I found some "old" blog explaining that the problem is the System.Windows.Forms library and propose to use the SendKey available in the IWebElement directly on the element:
string filePath = @"drive:\path\filename.filextension";
driver.FindElement(By.Id("fileInput")).SendKeys(filePath);
The problem is that I'm not able to make it work even locally...
I used Selenium IDE to find the Id of the element ( in my case it was "filepicker_2") but the displayed attribute of this element is "false"... and so I'm not able to interact with it...
I really don't know of to make it work fine on both environment (Locally and TeamCity's agent)..
Please someone to help me?
Thanks a lot
I hope you are executing team city agent as a command line instead of windows service.
I have used autoit scripts in past to perform file upload.
You can use JavaScript executor to manipulate the text setting to given element.
Thanks
Abhijit
Please ignore typos if any
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/41313f9a-bd9e-4bfa-afa8-9ef2a3146f97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a2ef133e-892e-46ea-9087-0a1cc26e4829%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.