1
我得到一个空白页,当尝试在硒GRID2使用C#代码段打开所需页面(google.com)在Firefox浏览器。 FF页面在我手动关闭之前不会关闭。相同的代码适用于IE和Chrome浏览器。空白页/ NUnit的
任何帮助,非常感谢。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
using NUnit.Framework;
namespace WebDriverExample
{
public class Class1
{
[TestFixture]
public class Testing
{
private IWebDriver driver;
[SetUp]
public void SetUp()
{
driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"), DesiredCapabilities.Firefox());
}
[Test]
public void TestGoogle()
{
driver.Navigate().GoToUrl("http://www.google.com");
}
[TearDown]
public void TearDown()
{
driver.Quit();
}
}
}
}