目的:[自動化] [在C#.NET通過SeleniumRC]fitSharp.Machine.Exception.TypeMissingException:類型未在組件中發現
打開email.com網站和登錄我想用硒FitNesse的框架來測試RC
問題:我不確定如何編寫動作夾具,請指導我。
以下是針對Selenium RC代碼使用Action Fixture的Fitnesse代碼。
!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|[email protected]|pwd|
ERROR:上執行在Fitnesse-錯誤上述代碼發生是:
- fitSharp.Machine.Exception.TypeMissingException:Type'emailTesting12.emailTest'notfound在組件:
- fitSharp。 Machine.Exception.MemberMissingException:成員'setuptest'具有1個未找到'System.Object'類型的參數。
- fitSharp.Machine.Exception.MemberMissingException:成員'thetestemailtest',其中1個參數找不到'System.Object'類型。
以下是在C#.NET中的硒RC碼
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();
}
}
}
請幫我解決一樣。
嗨@rdp它不是完全清楚你問這裏。你能稍微澄清一下你的問題嗎? – colincameron 2014-09-10 11:55:59
編輯該問題。請檢查 – rdp 2014-09-10 12:44:11