Selenium RC > how to upload file using attachFile()

后端 未结 8 784
谎友^
谎友^ 2021-02-04 14:02

I am using Selenium RC with Junit framework. I am trying to upload a file using attachFile() method.

attachFile: (Information collected from selenium API http:/         


        
8条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 14:30

    I just succesfully uploaded files using Selenium set to use *firefox as the browser. I guess they haven't updated the documentation yet.

    I am using the Ruby client so it was something like this to get it to work

    $browser.click "css=input.file" # This is the 'Choose File' button
    $browser.type "css=input.file", "/absolute/path/to/file.file"
    

提交回复
热议问题