WatiN - 支持firefox和chrome

时间:2011-11-04 17:18:47

标签: watin

有没有人知道WatiN是否有任何计划支持后期版本的firefox(> 3.6)? 目前我觉得它只支持所有版本的IE。 它只支持Firefox 2.x - 3.6(http://watin.org/documentation/setting-up-firefox/)

由于

2 个答案:

答案 0 :(得分:3)

最近在WatiN论坛上的帖子(对不起链接)Jeroen(WatiN概念)建议使用Selenium的网络驱动程序使WatiN与FireFox(或其他浏览器)兼容。

问题来自JSSH插件,WatiN依赖于控制FireFox,目前不支持/兼容FireFox版本> 3.6。

但是如果完成的话,就没有任何关于何时完成的事情。

答案 1 :(得分:2)

我使用名为mozrepl-jssh的jssh新插件解决了这个问题!插入。 它与我能够进行测试的FF 17 ESR版本一起工作正常。

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();
        }
    }
}

我面临的唯一问题是,如果页面未正确加载,则单击登录按钮将显示TimeOutException。 希望这对那些希望WATiN能够使用Firefox最新版本的人有所帮助。

此致 Rahoolm

相关问题