首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在程序集中找不到fitSharp.Machine.Exception.TypeMissingException:类型

在程序集中找不到fitSharp.Machine.Exception.TypeMissingException:类型
EN

Stack Overflow用户
提问于 2014-09-10 11:51:18
回答 1查看 1.4K关注 0票数 1

用途: AutomationOpen email.com站点和SeleniumRC在C#.NET中登录

我想在Selenium RC上使用Fitnesse框架进行测试。

问:我不知道如何写一个动作夹具,请指导我。

下面是Fitnesse代码,它使用为Selenium代码使用的动作夹具。

代码语言:javascript
复制
!define COMMAND {.\fit.dll %p}
!define TEST_RUNNER {.\Runner.exe}
!define path {.\emailTesting12.dll}

!|ActionFixture|
|start|emailTesting12.emailTest|
|enter|SetupTest|localhost|4444|*chrome|w3.email.com|xxx@email|pwd|

错误:在Fitnesse中执行上述代码时发生的错误是:

  1. fitSharp.Machine.Exception.TypeMissingException:类型‘assemblies’12.电子邮件测试未在程序集中找到:
  2. fitSharp.Machine.Exception.MemberMissingException:成员'setuptest‘,没有为'System.Object’类型找到一个(S)参数。
  3. fitSharp.Machine.Exception.MemberMissingException:成员'thetestemailtest‘,没有为'System.Object’类型找到一个(S)参数。

下面是C#.Net中的Selenium代码

代码语言:javascript
复制
namespace emailTesting12
{

    Class emailTest : fit.Fixture
    { 
        private ISelenium selenium; 
        private StringBuilder verificationErrors;

        public void SetupTest()  
        {  
            selenium = new DefaultSelenium("localhost", 9999, "*chrome", "https://email.com/");`     
            selenium.Start(); 
            verificationErrors = new StringBuilder();` 
        }

        public void TeardownTest()  
        {
            try   
            {
                selenium.Stop();      
            }
            catch (Exception) 
            {
            }
            Assert.AreEqual("", verificationErrors.ToString());
        }

        public void TheTestemailTest() 
        {
            selenium.Open("http://mail.email.com"); 
            selenium.Type("id=Email", "uname");  
            selenium.Type("id=Passwd", "xxxx"); 
            selenium.Click("id=signIn"); // login
            selenium.WaitForPageToLoad("300000");            
        }

        static void Main(string[] args)
        {
            emailTest g = new emailTest();
            g.SetupTest();
            g.TheTestemailTest();
        }
    }
}

请帮我解决同样的问题。

EN

回答 1

Stack Overflow用户

发布于 2014-09-11 11:56:29

!path定义路径,而不是!define path定义路径,例如!path c:\mypath\myCode.dll

请参阅http://fitsharp.github.io/Fit/UsingFitnesse.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25764699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档