Thanks Dan. After doing what you said, I got the following error. C:/Ruby187/lib/ruby/gems/1.8/ gems/selenium-webdriver-2.24.0/lib/selenium/webdriv er/ie/server.rb:13:in `get': Unable to find standalone executable. Please downlo ad the IEDriverServer from http://code.google.com/p/selenium/downloads/listand place the executable on your PATH.
I downloaded the executable file but i'm having hard time placing it. On Thursday, 12 July 2012 18:03:34 UTC+5:30, Mahesh Shivankar wrote: > > Hello, > > I'm trying to automate import feature present in TestLink on my own > virtual machine using watir. > For this I've written a script > > require 'rubygems' > require 'watir' > URL = "http://192.168.9.12/testlink" > > class Testlink > > def gototestlink() > > @ie = Watir::Browser.new > @ie.maximize > @ie.goto(URL) > end > > > def gotologin() > > @ie.text_field(:id, "login").set("mahesh") > @ie.text_field(:name, "tl_password").set("mahesh123") > @ie.button(:value, "Login").click > > end > > def gototestspec() > > @ie.frame(:name, "titlebar").link(:text, /test > specification/i).click > @ie.frame(:name, "mainframe").frame(:name, "treeframe").div(:id, > 'extdd-1').span(:id, 'extdd-3').click > @ie.frame(:name, "mainframe").frame(:name, > "workframe").div(:class, 'workBack').fieldset(:class, > 'groupBtn').button(:value, "Import").click > @ie.frame(:name, "mainframe").frame(:name, > "workframe").div(:class, 'workBack').file_field(:name, > "uploadedFile").set("D:\\testsuites.xml") > @ie.frame(:name, "mainframe").frame(:name, > "workframe").div(:class, 'workBack').div(:class, 'groupBtn').button(:value, > "Upload file").click > end > > end > > a = Testlink.new > a.gototestlink() > a.gotologin() > a.gototestspec() > > The problem I'm facing is, on IE after setting the file field with desired > file which I want to upload and clicking on the Upload file button, the > file field which was set goes blank and the script fails to upload the > required file. I'm using Internet Explorer 9 ( version : 9.0.8112.16421) > > But when I approach to the same task using watir-webdriver and Mozilla > Firefox browser, the script successfully uploads the desired file. > > You are most welcome for any comments or help. > > Regards, > Mahesh > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
