0

I want to upload a file by clicking on the button, when I click this button it will popup a file select window by windows, but as i know, selenium2Library can't handle the window of windows, so input path is diffcult, how can i do?

i tried simulate Keyboard Events to input path before, but sometimes it is not working.

the html source is below

<button title="Upload XML file of creation parameters" class="btn" type="button" id="ca_upload">Load file</button>
4

2 回答 2

1

您可以使用从 selenium2library 中选择文件关键字。它接受两个参数,第一个是按钮的定位器,第二个是需要上传的文件路径。

于 2014-08-08T02:14:27.170 回答
0

Selenium2 库不处理这些窗口。您可以使用AutoIT 库来选择要上传的文件。

于 2013-10-23T16:04:18.247 回答