質問

Can anyone please provide idea or site reference for handling File Upload Process using Selenium IDE?

Rest of the actions are recording thru' Selenium IDE but this upload process is alone giving trouble...

Thanks Karunagara Pandi

役に立ちましたか?

解決

A command like this works for me on Selenium IDE 2.5.0

Command: type
Target:  id=idOfFileInput
Value:   /full/path/to/uploadfile

Now I'm trying to find out how to pass a relative path from the Selenium script :-)

他のヒント

The general rule of the thumb is that you don't need to automate any "native dialogs" that are part of the web browser itself. What you do instead is recreate the same general function of the HTTP POST using Apache HTTP Utils. So, if the upload button has a URL that it posts the file upload to, all you do is recreate in code the file upload activity and skip using the native "browse for file" dialog and the "submit" button on that dialog. Instead, just manually post the file using code.

I think that is how most Selenium developers do it. In the future, there will be a WebDriver upgrade that adds control over native browser components and they are still working on it. It is called Marionette and the Mozilla foundation is working on it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top