I am using windows 10 32 bit ruby version 233, I am facing these issues with running the tests on a ie 11 browser and the chrome browser for the tests(using page object) that are already running on firefox browser,
ISSUE with IE: Watir::Exception::NoMatchingWindowFoundException: browser window was closed (eval):1:in `process_watir_call'
ISSUE with Chrome: Errno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9515 (No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 9515)
i have used the following hooks for ie and chrome:
Before do
case $browser
when 'mozilla'
@browser = Watir::Browser.new :firefox
@browser.window.maximize
when 'chrome'
@browser = Watir::Browser.new :chrome, :profile => "default"
when 'ie'
@browser = Watir::Browser.new :ie
# @browser.window.maximize
# @browser.visible = true
else
@browser = Watir::Browser.new :firefox
@browser.window.maximize
end
# @browser = Watir::Browser.new :firefox
# @browser.window.maximize
# this file contains test data that needs to be changed if tests are being executed in a different environment
$test_data = YAML.load_file('features/support/input_data/data/login_information.yml')
# this file contains base URL that needs to be changed if tests are being executed in a different environment
FigNewton.load('default.yml')
end
I was able to run a small sample test on a separate project from ruby mine with Watir gem. Is there any way to make it work on the existing firefox tests?
gem list watirwhat is listed (including version numbers)? Which lines of your code do the two errors above point to as failing, and can you show us those? - Chuck van der Lindenprocess_watir_call' ./features/support/pages/Messaging/login_page.rb:66:inenter_username_forward_receiver' ./features/step_definitions/loginpage.rb:21:in/^I enter my username and click on continue$/' ./features/Messages/loginpage.feature:11:inWhen I enter my username and click on continue' - sai charan