3

Does anyone know if there is any plan to support latter versions of firefox (> 3.6) by WatiN? As currently i feel it only supports all version of IE. It only supports Firefox 2.x - 3.6 (http://watin.org/documentation/setting-up-firefox/)

Thanks

Guru Kulkarni
  • 153
  • 3
  • 10
  • I think it would be best to use selenium webdriver since they update their code everytime firefox updates their browser. Watin last updated in 2011. – PHPGuru Oct 16 '13 at 16:47

2 Answers2

3

As a recent post on the WatiN forum (sorry no link) Jeroen (WatiN conceptor) suggested to make WatiN compatible with FireFox (or other browser) using Selenium's web-driver.

The problem come from the JSSH plugin, that WatiN depend on to control FireFox, that is currently not support/compatible for version of FireFox > 3.6.

But there's no commitement on when this would be done, if done at all.

Vaudry
  • 111
  • 3
2

I got the solution working with the jssh new plugin called as mozrepl-jssh! plugin. It works fine with the FF 17 ESR version I was able to do the tests.

using Microsoft.VisualStudio.TestTools.UnitTesting;
using WatiN.Core;
using WatiN.Core.Logging;
using System;

namespace TestProject
{
    [TestClass]
    public class FFTestJssh
    {

        private static FireFox ff = new FireFox("www.google.co.in");
        [TestMethod]
        public void TestMethod1()
        {
            //
            // TODO: Add test logic here
            //
            ff.GoTo("http://machine/loginpage");
            ff.TextField(Find.ByName("login_name")).TypeText("Test");
            ff.TextField(Find.ByName("login_password")).TypeText("Secret");
            try
            {
                ff.Button(Find.ByText("Login")).Click();
            }
            catch (TimeoutException te)
            {
                var str = te.Message;
                Logger.LogAction("Time out happened" + str);
            }

            ff.WaitForComplete();
        }
    }
}

The only issue I am facing is that click on the login button is giving TimeOutException if the page is not loaded properly. Hope this is helpful to someone who wants that WATiN should work on Firefox latest version.

Regards, Rahoolm

rahoolm
  • 733
  • 2
  • 12
  • 22