如何按顺序运行selenium C#测试用例?
我有10个使用selenium的c#测试用例,但它们没有按顺序运行,我如何才能按顺序运行测试用例 这是我的密码如何按顺序运行selenium C#测试用例?,c#,selenium,selenium-webdriver,automated-tests,C#,Selenium,Selenium Webdriver,Automated Tests,我有10个使用selenium的c#测试用例,但它们没有按顺序运行,我如何才能按顺序运行测试用例 这是我的密码 [Test] public void AddLeadWithOneTract() { ClickOnAddNewLead(driver); EnterLeadInfo(driver, leadDictionary); AddTract(driver); EnterTractInfo(driver, tractDictionary, "4n", "2e",
[Test]
public void AddLeadWithOneTract()
{
ClickOnAddNewLead(driver);
EnterLeadInfo(driver, leadDictionary);
AddTract(driver);
EnterTractInfo(driver, tractDictionary, "4n", "2e", "22", "NENE", "1000", "1000", "10");
SaveTract(driver);
SaveLeadAndExit(driver);
TryFindElementById(driver, "R2017000000", 2000);
}
[Test]
public void TestTractInfoValidation()
{
ClickOnAddNewLead(driver);
AddTract(driver);
EnterTractInfo(driver, tractDictionary, "4", "2", "22", "NENE", "-1000", "-1000", "-10");
SaveTract(driver);
string alertText = CloseAlertAndGetItsText(driver);
Assert.IsTrue(alertText.Contains("Please enter a valid Township"));
Assert.IsTrue(alertText.Contains("Please enter a valid Range"));
Assert.IsTrue(alertText.Contains("Please set valid asked price"));
Assert.IsTrue(alertText.Contains("Please enter a valid NRI"));
Assert.IsTrue(alertText.Contains("Please enter a valid NMA"));
}
Nunit 3.*
您的测试环境是什么?哪个版本?NUnit.Framework-3.6.0
[Test, Order(1)]
public void AddLeadWithOneTract()
{
}
[Test, Order(2)]
public void TestTractInfoValidation()
{
}