我正在尝试用Selenium驱动程序为自定义网站进行单元测试几个小时.问题是,我的第一个测试用例总是待定.我没有写过任何其他的.我尝试了几个不同的教程,但都没有.我做了什么:
最后,我正在关注此页面上的教程dotnet-developer.de!该教程也不起作用.它在vb.net中给出,但我在C#中将其翻译如下:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
namespace FastMenuSeleniumTests
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class UnitTest1
    {
        public IWebDriver driver;
        const string BaseURL = "http://www.bing.com";
        public UnitTest1()
        {
            // do nothing
        }
        private TestContext testContextInstance;
        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run. …Run Code Online (Sandbox Code Playgroud)