Here is my first class I named it Login.rb

require 'watir-webdriver'
require 'test/unit'
require 'test/unit/ui/console/testrunner'

module Loukya

class TestGoogle < Test::Unit::TestCase

def test_watir_search(url, link, loginID)
mobilityServer = url
backEnd = link
userID = loginID
shortSleep = 02
longSleep = 15
@ie = Watir::Browser.new :chrome
sleep(longSleep)
@ie.goto mobilityServer + '/mobileItsmWebApp/user/index#_login'
@ie.image(:src, '/mobileItsmWebApp/images/icons/
DownArrow20x20.png').click
@ie.link(:text, 'Settings').click
@ie.link(:text, 'Server').click
@ie.link(:text, 'Add URL').click
@ie.text_field(:name, 'serverUrl').set backEnd
@ie.link(:text, 'Add URL').click
@ie.text_field(:name, 'username').set userID
@ie.link(:text, 'Log In').click
sleep(shortSleep)
assert(@ie.text.include?("Home"))
end
end
end

Here is my second class I named it Incident.rb

require 'watir-webdriver'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'C:\Users\challagl\Desktop\mobility team\Automated Tests\New
Folder\Login'

class TestIncident < Test::Unit::TestCase

def test_ci
wcf = Loukya::TestGoogle.new
wcf.test_watir_search("http://localhost:8080";, "http://
15.80.162.12:13080", "Incident.Manager")
end
end

When I run my second class, i get the following error, please help me
out. Thanks.

ruby Incident.rb
Loaded suite Incident
Started
FE
Finished in 0.002 seconds.

1) Failure: default_test(Loukya::TestGoogle) [Incident.rb:11]: No
tests were specified.

2) Error: test_ci(TestIncident): ArgumentError: wrong number of
arguments (0 for 1) Incident.rb:12:in initialize' Incident.rb:
12:innew' Incident.rb:12:in `test_ci'

2 tests, 1 assertions, 1 failures, 1 errors

Exit code: 1

-- 
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]

Reply via email to